Skip to content

Commit

Permalink
fix(vue-app): null check for $root access (#9150)
Browse files Browse the repository at this point in the history
Co-authored-by: Payel <payelk@ngdata.com>
  • Loading branch information
PayelKarmakar06 and PayelKarmakarNG committed Aug 11, 2021
1 parent 4a95333 commit 20e7b99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vue-app/template/index.js
Expand Up @@ -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 %>
}
Expand Down

0 comments on commit 20e7b99

Please sign in to comment.