htc 1 周之前
父节点
当前提交
b5d1b1987c
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      pages/home.vue
  2. 1 1
      pagesMy/device.vue

+ 1 - 1
pages/home.vue

@@ -67,7 +67,7 @@
 					if(res.data.code!==0) return this.$showToast(res.data.msg)
 					this.list = res.data.data;
 					this.list.forEach(l=>{
-						l.roleModelName = this.modelMap.get(l.agent.systemPrompt).agentName;
+						l.roleModelName = this.modelMap.get(l?.agent?.systemPrompt)?.agentName;
 					})
 				})
 			},

+ 1 - 1
pagesMy/device.vue

@@ -59,7 +59,7 @@
 					if(res.data.code!==0) return this.$showToast(res.data.msg)
 					this.list = res.data.data;
 					this.list.forEach(l=>{
-						l.roleModelName = this.modelMap.get(l.agent.systemPrompt).agentName;
+						l.roleModelName = this.modelMap.get(l?.agent?.systemPrompt)?.agentName;
 					})
 				})
 			},