Skip to content

Commit c0782c9

Browse files
authored
fix(firefox): removed settimeout to fix error on firefox
1 parent 911b11c commit c0782c9

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

src/lib/sandbox/main-register-window.ts

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,17 @@ export const registerWindow = (
5757

5858
const onLocationChange =
5959
(type: LocationUpdateType, state: object, newUrl?: string, oldUrl?: string) => () => {
60-
setTimeout(() => {
61-
worker.postMessage([
62-
WorkerMessageType.LocationUpdate,
63-
{
64-
$winId$,
65-
type,
66-
state,
67-
url: doc.baseURI,
68-
newUrl,
69-
oldUrl,
70-
},
71-
]);
72-
});
60+
worker.postMessage([
61+
WorkerMessageType.LocationUpdate,
62+
{
63+
$winId$,
64+
type,
65+
state,
66+
url: doc.baseURI,
67+
newUrl,
68+
oldUrl,
69+
},
70+
]);
7371
};
7472

7573
history.pushState = (state, _, newUrl) => {

0 commit comments

Comments
 (0)