From b95a390854485421de7767f568091deaf16d3149 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Grabarz?= Date: Fri, 26 Jul 2024 16:38:42 +0200 Subject: [PATCH] Avoid calling wasm parser immediately on widget module load. (#10688) Fixes a race condition causing error in RC4: ``` index-ykDiQPdr.js:38 TypeError: Cannot read properties of undefined (reading '__wbindgen_add_to_stack_pointer') ``` --- app/gui2/src/components/GraphEditor/widgets/WidgetText.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/gui2/src/components/GraphEditor/widgets/WidgetText.vue b/app/gui2/src/components/GraphEditor/widgets/WidgetText.vue index ddb2ce06da..022ce06e25 100644 --- a/app/gui2/src/components/GraphEditor/widgets/WidgetText.vue +++ b/app/gui2/src/components/GraphEditor/widgets/WidgetText.vue @@ -64,7 +64,7 @@ function makeLiteralFromUserInput(value: string): Ast.Owned inputTextLiteral.value ?? emptyTextLiteral) +const shownLiteral = computed(() => inputTextLiteral.value ?? emptyTextLiteral.value) const closeToken = computed(() => shownLiteral.value.close ?? shownLiteral.value.open) const textContents = computed(() => shownLiteral.value.rawTextContent) @@ -73,7 +73,8 @@ watch(textContents, (value) => (editedContents.value = value))