diff --git a/src/components/AiAreaPicker.vue b/src/components/AiAreaPicker.vue index 3164a77b..1136d90c 100644 --- a/src/components/AiAreaPicker.vue +++ b/src/components/AiAreaPicker.vue @@ -165,12 +165,12 @@ export default { let self = this.fullArea.find((e) => e.id == this.areaId) if (this.value && !this.areaName && this.value !== this.areaId) { - this.areaName = this.list.find((e) => e.id == this.value).name + this.areaName = this.list.find((e) => e.id == this.value)?.name } if (!this.areaName && this.value === this.areaId) { this.areaName = self.name } - if (self.id) { + if (self?.id) { this.list.unshift(self) } this.scrollHeight() @@ -210,7 +210,7 @@ export default { }, getChild(op) { if (op.id != this.index) { - if (op.type <= this.valueLevel && op.type < 5 && (/0{3}$/g.test(this.index) || !this.index)) { + if (op.type < this.valueLevel && op.type < 5 && (/0{3}$/g.test(this.index) || !this.index)) { this.fullArea.push(op) this.getChildAreas(op.id) }