Skip to content

Commit b61762e

Browse files
authored
fix: [#1772] Set 0 instead of undefined as default in setTimeout to prevent Bun from logging a "TimeoutNaNWarning"
Without this, I get a TimeoutNaNWarning: NaN is not a number. (with bun)
1 parent a576202 commit b61762e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/happy-dom/src/window/BrowserWindow.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1335,7 +1335,7 @@ export default class BrowserWindow extends EventTarget implements INodeJSGlobal
13351335
timeout.callback();
13361336
}
13371337
}
1338-
});
1338+
}, 0);
13391339

13401340
zeroDelayTimeout.timeouts = [];
13411341
this.#browserFrame[PropertySymbol.asyncTaskManager].startTimer(id);

0 commit comments

Comments
 (0)