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,8 +108,10 @@
// Update width & height on resize // Update width & height on resize
$: { $: {
store.width.set(clientWidth); if (clientWidth !== undefined && clientHeight !== undefined) {
store.height.set(clientHeight); store.width.set(clientWidth);
store.height.set(clientHeight);
}
} }
// this updates the store for simple changes // this updates the store for simple changes