From d88485a730da68a6618987d6ec49fc43bcd5b3a5 Mon Sep 17 00:00:00 2001 From: Damnae Date: Thu, 1 Feb 2024 23:24:53 +0100 Subject: [PATCH] Fix AI display when there is no root task. --- src/gamecore/AnyTask.vue | 4 ++-- src/gamecore/MissingTask.vue | 2 +- src/sources/characterai.ts | 2 +- src/views/aside/MonsterAI.vue | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gamecore/AnyTask.vue b/src/gamecore/AnyTask.vue index 756507d..c10d9ca 100644 --- a/src/gamecore/AnyTask.vue +++ b/src/gamecore/AnyTask.vue @@ -4,7 +4,7 @@ import { taskTypeToComponentName, } from '@/common/common'; const props = defineProps<{node:GamecoreTask, withComponentName?:string}>() - const taskName = props.withComponentName ?? taskTypeToComponentName(props.node.$type) + const taskName = props.withComponentName ?? taskTypeToComponentName(props.node?.$type ?? 'MissingTask') const taskComponent = defineAsyncComponent({ loader: async () => { @@ -25,7 +25,7 @@