Skip to content

Commit

Permalink
chore: Fix anchor nav in docs breaking interactive demos (#501)
Browse files Browse the repository at this point in the history
  • Loading branch information
franky47 authored Feb 13, 2024
1 parent e0762e9 commit 3605e14
Show file tree
Hide file tree
Showing 4 changed files with 170 additions and 17 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@
"isarray": "npm:@nolyfill/isarray@latest",
"side-channel": "npm:@nolyfill/side-channel@latest",
"string.prototype.padend": "npm:@nolyfill/string.prototype.padend@latest"
},
"patchedDependencies": {
"[email protected]": "patches/[email protected]"
}
}
}
2 changes: 1 addition & 1 deletion packages/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"clsx": "^2.1.0",
"dayjs": "^1.11.10",
"lucide-react": "^0.323.0",
"next": "14.1.0",
"next": "14.1.1-canary.0",
"next-docs-mdx": "6.0.2",
"next-docs-ui": "6.0.2",
"next-docs-zeta": "6.0.2",
Expand Down
20 changes: 20 additions & 0 deletions patches/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 0000000000000000000000000000000000000000..fa29cdfff915566d202c195607a42b9445919261
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1 @@
+**
\ No newline at end of file
diff --git a/dist/client/components/app-router.js b/dist/client/components/app-router.js
index aa2818d8ead9ed713077ff715a411d04dc149ee5..b15f914df85079a31870b0a09279be08019e503f 100644
--- a/dist/client/components/app-router.js
+++ b/dist/client/components/app-router.js
@@ -376,6 +376,7 @@ function Head(param) {
const originalReplaceState = window.history.replaceState.bind(window.history);
// Ensure the canonical URL in the Next.js Router is updated when the URL is changed so that `usePathname` and `useSearchParams` hold the pushed values.
const applyUrlFromHistoryPushReplace = (url)=>{
+ if (!window.history.state) return;
const href = window.location.href;
(0, _react.startTransition)(()=>{
dispatch({
162 changes: 146 additions & 16 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3605e14

Please sign in to comment.