[中] AgentChat模板中JSON.parse无异常捕获 #92
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
问题描述
frontend/src/views/AgentChat.vue 第98行,模板中直接使用 JSON.parse() 解析可能为空的字符串,无异常保护,会导致页面渲染崩溃。
涉及文件
修复建议
使用 computed 属性或在方法中安全解析 JSON,异常时返回默认值。
严重程度
中 - 页面崩溃风险