Skip to content

Commit

Permalink
fix: document is not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
laplacetw committed Apr 16, 2024
1 parent 1deb120 commit 7c5db13
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions .vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ export default {
app.component('About', About)

// https://github.com/vuejs/vitepress/issues/3100
router.onBeforeRouteChange = () => {
const jsonLdId = 'postJsonLd'
const jsonLd = document.getElementById(jsonLdId)
if (jsonLd) {
jsonLd.parentNode?.removeChild(jsonLd)
}
}
// router.onBeforeRouteChange = () => {}
}
}

0 comments on commit 7c5db13

Please sign in to comment.