@jsenv/navi 0.27.57 → 0.27.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/jsenv_navi.js +9 -2
- package/dist/jsenv_navi.js.map +3 -3
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -14718,8 +14718,15 @@ const setupBrowserIntegrationViaHistory = ({
|
|
|
14718
14718
|
updateDocumentState(state);
|
|
14719
14719
|
}
|
|
14720
14720
|
|
|
14721
|
-
//
|
|
14722
|
-
|
|
14721
|
+
// Skip route matching for state-only changes: push/replace to the same URL
|
|
14722
|
+
// (e.g. useNavState updating document state without changing the route).
|
|
14723
|
+
// Do NOT apply for "traverse" — window.location.href is already updated by
|
|
14724
|
+
// the browser before the popstate handler runs, so isSameUrl is always true
|
|
14725
|
+
// for back/forward navigation regardless of whether the URL actually changed.
|
|
14726
|
+
if (
|
|
14727
|
+
isSameUrl &&
|
|
14728
|
+
(navigationType === "push" || navigationType === "replace")
|
|
14729
|
+
) {
|
|
14723
14730
|
return undefined;
|
|
14724
14731
|
}
|
|
14725
14732
|
|