chore(svelte): prevent undefined for width and height

This commit is contained in:
moklick
2023-10-30 11:14:10 +01:00
parent d1662f1703
commit bbdff5ab10
@@ -108,9 +108,11 @@
// Update width & height on resize // Update width & height on resize
$: { $: {
if (clientWidth !== undefined && clientHeight !== undefined) {
store.width.set(clientWidth); store.width.set(clientWidth);
store.height.set(clientHeight); store.height.set(clientHeight);
} }
}
// this updates the store for simple changes // this updates the store for simple changes
// where the prop names equals the store name // where the prop names equals the store name