Skip to content

Commit

Permalink
fix(nuxt): avoid scanning payload for now
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw committed Aug 15, 2022
1 parent 1f50335 commit e11a085
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions packages/nuxt/src/runtime/plugin-fallback.client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@ import { defineNuxtPlugin } from '#app'
import { watch } from '#imports'

export default defineNuxtPlugin((nuxtApp) => {
if (nuxtApp.payload.data?.schemaOrg) {
nuxtApp._useHead(nuxtApp.payload.data.schemaOrg)
}
else {
// remove script to avoid confusion
watch(() => nuxtApp._route.path, () => {
document.querySelector('script[data-id="schema-org-graph"]')?.remove()
})
}
// remove script to avoid confusion
watch(() => nuxtApp._route.path, () => {
document.querySelector('script[data-id="schema-org-graph"]')?.remove()
})
})

0 comments on commit e11a085

Please sign in to comment.