fix: $nuxt is used instead of globalName (#4743)

This commit is contained in:
Xingkai Wang 2019-01-22 02:23:07 +13:00 committed by Pooya Parsa
parent dcdbaba710
commit fe57a5a929
2 changed files with 2 additions and 2 deletions

View File

@ -160,7 +160,7 @@ async function loadAsyncComponents(to, from, next) {
}
this.error({ statusCode, message })
this.$nuxt.$emit('routeChanged', to, from, err)
this.<%= globals.nuxt %>.$emit('routeChanged', to, from, err)
next()
}
}

View File

@ -66,7 +66,7 @@ export default {
},
canPrefetch() {
const conn = navigator.connection
const hasBadConnection = this.$nuxt.isOffline || (conn && ((conn.effectiveType || '').includes('2g') || conn.saveData))
const hasBadConnection = this.<%= globals.nuxt %>.isOffline || (conn && ((conn.effectiveType || '').includes('2g') || conn.saveData))
return !hasBadConnection
},