Skip to content

Commit

Permalink
fix: update location before calling pushState handlers (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
slawekkolodziej committed May 27, 2022
1 parent c124a7d commit d301e42
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/web-worker/index.ts
Expand Up @@ -44,9 +44,9 @@ const receiveMessageFromSandboxToWorker = (ev: MessageEvent<MessageFromSandboxTo
const $winId$ = msgValue.$winId$;
const env = environments[$winId$];

forwardLocationChange(msgValue.$winId$, env, msgValue);

env.$location$.href = msgValue.url;

forwardLocationChange(msgValue.$winId$, env, msgValue);
} else if (msgType === WorkerMessageType.CustomElementCallback) {
callCustomElementCallback(...msg);
}
Expand Down

1 comment on commit d301e42

@vercel
Copy link

@vercel vercel bot commented on d301e42 May 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.