fix: Fix regression bug related to setContext()

This commit is contained in:
devneko 2017-10-30 20:05:12 +09:00
parent 3ece774164
commit 4b5a0352ff

View File

@ -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)