From 951e745e549d8dc676cd9393289f29c52c4a2564 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Wed, 19 Dec 2018 18:29:45 +0100 Subject: [PATCH] fix(vue-app): Set window. equals to window.{globalName} when defined --- packages/vue-app/template/App.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/vue-app/template/App.js b/packages/vue-app/template/App.js index 865b707b66..c21dfb29c9 100644 --- a/packages/vue-app/template/App.js +++ b/packages/vue-app/template/App.js @@ -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