From e522604de605a0c37226439c23cb0cfa353ad956 Mon Sep 17 00:00:00 2001 From: Payel Date: Wed, 14 Apr 2021 17:42:02 +0530 Subject: [PATCH] fix: null check for --- packages/vue-app/template/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 %> }