diff --git a/lib/app/client.js b/lib/app/client.js index 004788d4eb..87ed476617 100644 --- a/lib/app/client.js +++ b/lib/app/client.js @@ -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)