Skip to content

Commit

Permalink
fix: test for nuxt instance before loading static
Browse files Browse the repository at this point in the history
 closes #143
  • Loading branch information
danielroe committed Jul 9, 2020
1 parent 2d4e10b commit 43d5ee6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const loadFullStatic = (vm: AugmentedComponentInstance) => {
: fetchOnServer !== false

const nuxt = vm.$nuxt as AugmentedNuxtApp
if (!fetchedOnServer || nuxt.isPreview || !nuxt._pagePayload) {
if (!fetchedOnServer || nuxt?.isPreview || !nuxt?._pagePayload) {
return
}
vm._hydrated = true
Expand Down

0 comments on commit 43d5ee6

Please sign in to comment.