mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-12 03:38:07 +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
|
// Update context
|
||||||
setContext(app, {
|
await setContext(app, {
|
||||||
route: to,
|
route: to,
|
||||||
from,
|
from,
|
||||||
next: _next.bind(this)
|
next: _next.bind(this)
|
||||||
@ -418,7 +418,7 @@ function addHotReload ($component, depth) {
|
|||||||
|
|
||||||
var _forceUpdate = $component.$forceUpdate.bind($component.$parent)
|
var _forceUpdate = $component.$forceUpdate.bind($component.$parent)
|
||||||
|
|
||||||
$component.$vnode.context.$forceUpdate = () => {
|
$component.$vnode.context.$forceUpdate = async () => {
|
||||||
let Components = getMatchedComponents(router.currentRoute)
|
let Components = getMatchedComponents(router.currentRoute)
|
||||||
let Component = Components[depth]
|
let Component = Components[depth]
|
||||||
if (!Component) return _forceUpdate()
|
if (!Component) return _forceUpdate()
|
||||||
@ -433,7 +433,7 @@ function addHotReload ($component, depth) {
|
|||||||
<%= (loading ? 'this.$loading.finish && this.$loading.finish()' : '') %>
|
<%= (loading ? 'this.$loading.finish && this.$loading.finish()' : '') %>
|
||||||
router.push(path)
|
router.push(path)
|
||||||
}
|
}
|
||||||
setContext(app, {
|
await setContext(app, {
|
||||||
route: router.currentRoute,
|
route: router.currentRoute,
|
||||||
isHMR: true,
|
isHMR: true,
|
||||||
next: next.bind(this)
|
next: next.bind(this)
|
||||||
|
Loading…
Reference in New Issue
Block a user