Skip to content

Commit 0c7b9b0

Browse files
committed
fix: error when resizing editor
Re: #53
1 parent fc3adaf commit 0c7b9b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: packages/carta-md/src/lib/internal/components/Toolbar.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
const waitForDOMUpdate = () => new Promise(requestAnimationFrame);
4545
4646
const onResize = debounce(async () => {
47-
// Resize to fit the icons
47+
if (!toolbar || !iconsContainer) return;
4848
const overflowing = () => toolbar.scrollWidth - toolbar.clientWidth > 0;
4949
while (overflowing()) {
5050
visibleIcons.pop();

0 commit comments

Comments
 (0)