mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-30 23:32:38 +00:00
fix: Fix regression bug related to setContext()
This commit is contained in:
parent
3ece774164
commit
4b5a0352ff
@ -185,7 +185,7 @@ async function render (to, from, next) {
|
||||
}
|
||||
|
||||
// Update context
|
||||
setContext(app, {
|
||||
await setContext(app, {
|
||||
route: to,
|
||||
from,
|
||||
next: _next.bind(this)
|
||||
@ -418,7 +418,7 @@ function addHotReload ($component, depth) {
|
||||
|
||||
var _forceUpdate = $component.$forceUpdate.bind($component.$parent)
|
||||
|
||||
$component.$vnode.context.$forceUpdate = () => {
|
||||
$component.$vnode.context.$forceUpdate = async () => {
|
||||
let Components = getMatchedComponents(router.currentRoute)
|
||||
let Component = Components[depth]
|
||||
if (!Component) return _forceUpdate()
|
||||
@ -433,7 +433,7 @@ function addHotReload ($component, depth) {
|
||||
<%= (loading ? 'this.$loading.finish && this.$loading.finish()' : '') %>
|
||||
router.push(path)
|
||||
}
|
||||
setContext(app, {
|
||||
await setContext(app, {
|
||||
route: router.currentRoute,
|
||||
isHMR: true,
|
||||
next: next.bind(this)
|
||||
|
Loading…
Reference in New Issue
Block a user