Skip to content

Commit b3b674e

Browse files
authored
Merge branch 'main' into fix-issue-1967
2 parents 3cf6185 + 02cd41e commit b3b674e

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

‎.changeset/tricky-goats-cheer.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@solidjs/start": patch
3+
---
4+
5+
Stop the dev toolbar from reporting benign `ResizeObserver loop` notifications as application errors. Browsers dispatch these as window `error` events carrying no error object, so the toolbar was capturing the raw `ErrorEvent` and force-opening the error panel over the app on every resize.

‎packages/start/src/shared/dev-toolbar/index.tsx‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,11 @@ export function DevToolbar(props: DevToolbarProps) {
157157

158158
createEffect(() => {
159159
const onErrorEvent = (error: ErrorEvent) => {
160+
// Browsers dispatch benign ResizeObserver loop notifications as window
161+
// "error" events carrying no error object. They aren't app errors.
162+
if (!error.error && error.message?.startsWith("ResizeObserver loop")) {
163+
return;
164+
}
160165
pushError(error.error ?? error);
161166
};
162167

0 commit comments

Comments
 (0)