Skip to content

Commit 2cb8405

Browse files
fix: Disconnect MutationObserver synchronously in wait-for (#801)
* Disconnect MutationObserver synchronously in wait-for * Revert the pre-commit change to be able to commit * Remove legacy disconnect Co-authored-by: Kent C. Dodds <[email protected]>
1 parent 2cc8a11 commit 2cb8405

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wait-for.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ function waitFor(
9494

9595
if (!usingFakeTimers) {
9696
clearInterval(intervalId)
97-
setImmediate(() => observer.disconnect())
97+
observer.disconnect()
9898
}
9999

100100
if (error) {

0 commit comments

Comments
 (0)