mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 06:05:11 +00:00
fix(vue-app): null
check for $root
access (#9150)
Co-authored-by: Payel <payelk@ngdata.com>
This commit is contained in:
parent
4a95333a13
commit
20e7b99eb6
@ -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 %>
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user