Skip to content

Commit

Permalink
fix: remove initial history replacement action from queue
Browse files Browse the repository at this point in the history
  • Loading branch information
orionmiz committed Oct 16, 2023
1 parent be4aad7 commit 46c08d8
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions extensions/plugin-history-sync/src/historySyncPlugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,17 +161,15 @@ export function historySyncPlugin<

const lastStep = last(rootActivity.steps);

enqueue(() =>
replaceState({
history,
pathname: template.fill(rootActivity.params),
state: {
activity: rootActivity,
step: lastStep,
},
useHash: options.useHash,
}),
);
replaceState({
history,
pathname: template.fill(rootActivity.params),
state: {
activity: rootActivity,
step: lastStep,
},
useHash: options.useHash,
});

const onPopState: Listener = (e) => {
if (popFlag) {
Expand Down

0 comments on commit 46c08d8

Please sign in to comment.