chore(svelte): prevent undefined for width and height
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user