From bbdff5ab10be24bb67a54816a9d60204998da953 Mon Sep 17 00:00:00 2001 From: moklick Date: Mon, 30 Oct 2023 11:14:10 +0100 Subject: [PATCH] chore(svelte): prevent undefined for width and height --- .../svelte/src/lib/container/SvelteFlow/SvelteFlow.svelte | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/svelte/src/lib/container/SvelteFlow/SvelteFlow.svelte b/packages/svelte/src/lib/container/SvelteFlow/SvelteFlow.svelte index cfa66d67..36209b17 100644 --- a/packages/svelte/src/lib/container/SvelteFlow/SvelteFlow.svelte +++ b/packages/svelte/src/lib/container/SvelteFlow/SvelteFlow.svelte @@ -108,8 +108,10 @@ // Update width & height on resize $: { - store.width.set(clientWidth); - store.height.set(clientHeight); + if (clientWidth !== undefined && clientHeight !== undefined) { + store.width.set(clientWidth); + store.height.set(clientHeight); + } } // this updates the store for simple changes