Skip to content

Commit

Permalink
fix(vitepress): avoid updating DOM when SSR
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw committed Aug 23, 2022
1 parent 15bb62e commit 448aaf6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/vite/src/vitepress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export function installSchemaOrg(ctx: EnhanceAppContext, config: UserConfig) {
},
updateHead(fn) {
head.addHeadObjs(fn)
head.updateDOM()
if (typeof document !== 'undefined')
head.updateDOM()
},
})

Expand Down

0 comments on commit 448aaf6

Please sign in to comment.