Skip to content

Commit

Permalink
reset history title after push/replace but prior to assignment to loc…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
martrapp committed Mar 29, 2024
1 parent e648c55 commit 417a936
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/astro/src/transitions/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ const moveToLocation = (
);
}
}
document.title = targetPageTitle;
// now we are on the new page for non-history navigations!
// (with history navigation page change happens before popstate is fired)
originalLocation = to;
Expand Down Expand Up @@ -212,7 +213,6 @@ const moveToLocation = (
}
history.scrollRestoration = 'manual';
}
document.title = targetPageTitle;
};

function preloadStyleLinks(newDocument: Document) {
Expand Down

0 comments on commit 417a936

Please sign in to comment.