mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +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.error({ statusCode, message })
|
||||||
this.$nuxt.$emit('routeChanged', to, from, err)
|
this.<%= globals.nuxt %>.$emit('routeChanged', to, from, err)
|
||||||
next()
|
next()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ export default {
|
|||||||
},
|
},
|
||||||
canPrefetch() {
|
canPrefetch() {
|
||||||
const conn = navigator.connection
|
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
|
return !hasBadConnection
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user