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
|
Vue.prototype.<%= globals.nuxt %> = this
|
||||||
// add to window so we can listen when ready
|
// add to window so we can listen when ready
|
||||||
if (typeof window !== 'undefined') {
|
if (typeof window !== 'undefined') {
|
||||||
window.<%= globals.nuxt %> = this
|
window.<%= globals.nuxt %> = <%= (globals.nuxt !== '$nuxt' ? 'window.$nuxt = ' : '') %>this
|
||||||
<% if (globals.nuxt !== '$nuxt') { %>
|
|
||||||
window.$nuxt = { $root: { constructor: this.$root.constructor } }
|
|
||||||
<% } %>
|
|
||||||
}
|
}
|
||||||
// Add $nuxt.error()
|
// Add $nuxt.error()
|
||||||
this.error = this.nuxt.error
|
this.error = this.nuxt.error
|
||||||
|
Loading…
Reference in New Issue
Block a user