Skip to content

Commit

Permalink
chore: bump vitepress, revert #2792
Browse files Browse the repository at this point in the history
  • Loading branch information
brc-dd committed Apr 9, 2024
1 parent 480e12d commit a177175
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 43 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -14,7 +14,7 @@
"@vue/theme": "^2.2.5",
"dynamics.js": "^1.1.5",
"gsap": "^3.9.0",
"vitepress": "^1.0.0",
"vitepress": "^1.1.0",
"vue": "^3.4.0"
},
"devDependencies": {
Expand Down
66 changes: 33 additions & 33 deletions pnpm-lock.yaml

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

11 changes: 2 additions & 9 deletions src/examples/utils.ts
Expand Up @@ -208,15 +208,8 @@ export function resolveNoBuildExample(
}

export function onHashChange(cb: () => void) {
if (typeof document === 'undefined') return
const { pathname } = window.location
function handler() {
if (window.location.pathname === pathname) {
cb()
}
}
window.addEventListener('hashchange', handler)
window.addEventListener('hashchange', cb)
onBeforeUnmount(() => {
window.removeEventListener('hashchange', handler)
window.removeEventListener('hashchange', cb)
})
}

0 comments on commit a177175

Please sign in to comment.