diff --git a/packages/vue-app/template/index.js b/packages/vue-app/template/index.js index 58c1e231ee7d..0b9ec8fbc9df 100644 --- a/packages/vue-app/template/index.js +++ b/packages/vue-app/template/index.js @@ -46,7 +46,7 @@ Vue.component(Nuxt.name, Nuxt) Object.defineProperty(Vue.prototype, '<%= globals.nuxt %>', { get() { - const globalNuxt = this.$root.$options.<%= globals.nuxt %> + const globalNuxt = this.$root ? this.$root.$options.<%= globals.nuxt %> : null if (process.client && !globalNuxt && typeof window !== 'undefined') { return window.<%= globals.nuxt %> }