From bdde59d7b385fbdbbac722f918672c7e3d601d56 Mon Sep 17 00:00:00 2001 From: Axel Baudot <74733630+axelbdt@users.noreply.github.com> Date: Thu, 27 Jul 2023 07:59:50 -0400 Subject: [PATCH] fix: prevent error if json editor not mounted (#1945) --- frontend/src/lib/components/SchemaEditor.svelte | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/lib/components/SchemaEditor.svelte b/frontend/src/lib/components/SchemaEditor.svelte index c42834957e..cf52d6e29e 100644 --- a/frontend/src/lib/components/SchemaEditor.svelte +++ b/frontend/src/lib/components/SchemaEditor.svelte @@ -102,7 +102,9 @@ } schema = schema schemaString = JSON.stringify(schema, null, '\t') - jsonEditor.setCode(schemaString) + if (jsonEditor) { + jsonEditor.setCode(schemaString) + } dispatch('change', schema) }