From 22e1fd0097dabb39b52bb83b5ce0cf49969a5b97 Mon Sep 17 00:00:00 2001 From: Jos de Jong Date: Fri, 25 Oct 2024 10:31:27 +0200 Subject: [PATCH] fix: do not throw an error in case when passing an unknown property to `updateProps` --- src/lib/components/JSONEditor.svelte | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/components/JSONEditor.svelte b/src/lib/components/JSONEditor.svelte index 4ab40654..ff7e8315 100644 --- a/src/lib/components/JSONEditor.svelte +++ b/src/lib/components/JSONEditor.svelte @@ -374,7 +374,7 @@ default: // We should never reach this default case - exhaustiveGuard(name) + unknownProperty(name) } } @@ -382,8 +382,8 @@ queryLanguageId = queryLanguages[0].id } - function exhaustiveGuard(name: never): never { - throw new Error(`Unknown property "${name}"`) + function unknownProperty(name: never) { + debug(`Unknown property "${name}"`) } await tick() // await rerender