mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
fix(vue-app): Set window. equals to window.{globalName} when defined
This commit is contained in:
parent
6c4280f87f
commit
951e745e54
@ -66,10 +66,7 @@ export default {
|
||||
Vue.prototype.<%= globals.nuxt %> = this
|
||||
// add to window so we can listen when ready
|
||||
if (typeof window !== 'undefined') {
|
||||
window.<%= globals.nuxt %> = this
|
||||
<% if (globals.nuxt !== '$nuxt') { %>
|
||||
window.$nuxt = { $root: { constructor: this.$root.constructor } }
|
||||
<% } %>
|
||||
window.<%= globals.nuxt %> = <%= (globals.nuxt !== '$nuxt' ? 'window.$nuxt = ' : '') %>this
|
||||
}
|
||||
// Add $nuxt.error()
|
||||
this.error = this.nuxt.error
|
||||
|
Loading…
Reference in New Issue
Block a user