Skip to content

Commit a73c919

Browse files
committed
fix(stage-web): reduce the timeout guard for MutationObserver to 15 secs
1 parent eaa418e commit a73c919

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

apps/stage-web/src/main.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,7 @@ if (import.meta.env.DEV && !import.meta.env.SSR) {
8181

8282
observer.observe(document.body, { childList: true, subtree: true })
8383

84-
// Disconnect on timeout (in case)
85-
setTimeout(() => {
86-
observer.disconnect() // Safe to call even if already disconnected
87-
}, 60 * 1000)
84+
// Disconnect on timeout in case the MutationObserver is left here forever.
85+
// `observer.disconnect()` is idempotent, so it's safe to call it multiple times.
86+
setTimeout(() => observer.disconnect(), 15 * 1000)
8887
}

0 commit comments

Comments
 (0)