diff --git a/packages/vue-app/template/index.js b/packages/vue-app/template/index.js index 11d4821d26..06fb94f5c5 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 %> }