提交 f350da6e 编写于 作者: D DebugIsFalse

fix: 错误提示

上级 7a56ec4a
......@@ -373,9 +373,11 @@ async function fetchLinkedQuestion (query) {
asking.value = false
return
}
recommendQuestions.value = data.value.data.items.map(item => {
return { title: typeof item === 'string' ? item : item.question }
})
if (data.value && data.value.data) {
recommendQuestions.value = data.value.data.items.map(item => {
return { title: typeof item === 'string' ? item : item.question }
})
}
}
function generateFetchData (query) {
const { gitPath, id } = state
......
......@@ -148,7 +148,7 @@ export function handleSetServiceErrorInfo (message) {
return error
}
// 处理流式错误信息
if (meta && meta.code !== 200) {
if (meta && meta.code && meta.code !== 200) {
return choices[0].message.content
}
return ''
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册