Skip to content

Commit c21f797

Browse files
committed
hperrin#690 during rezising, element can be removed from DOM. Catch potential error by returning null if element is not in DOM.
1 parent 9effccd commit c21f797

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/bottom-app-bar/src/BottomAppBar.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@
172172
}
173173
174174
function getTopAppBarHeight() {
175-
return getElement().getBoundingClientRect().height;
175+
return getElement()?.getBoundingClientRect().height;
176176
}
177177
178178
let oldVariant: 'fixed' | 'static' | 'standard' | null = null;

0 commit comments

Comments
 (0)