mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
fix: $nuxt is used instead of globalName (#4743)
This commit is contained in:
parent
dcdbaba710
commit
fe57a5a929
@ -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()
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user