From 7d03ecd7bc60c05e6ca6ad9f132cba8bc3ad6fe6 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Tue, 14 Apr 2026 20:03:01 +0200 Subject: [PATCH] Refactor condition in readProjectDialogueLibrary to handle undefined values correctly --- src/document/migrate-scene-document.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/document/migrate-scene-document.ts b/src/document/migrate-scene-document.ts index 84698255..2d9a5289 100644 --- a/src/document/migrate-scene-document.ts +++ b/src/document/migrate-scene-document.ts @@ -3391,7 +3391,11 @@ function readProjectDialogueLibrary( label: string, options: { allowMissing: boolean } ): ProjectDialogueLibrary { - if (value === undefined && options.allowMissing) { + if (value === undefined) { + if (options.allowMissing) { + return createEmptyProjectDialogueLibrary(); + } + return createEmptyProjectDialogueLibrary(); }