Skip to content

Commit

Permalink
fix: Fix regression bug related to setContext()
Browse files Browse the repository at this point in the history
  • Loading branch information
dotneet committed Oct 30, 2017
1 parent 3ece774 commit 4b5a035
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/app/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ async function render (to, from, next) {
}

// Update context
setContext(app, {
await setContext(app, {
route: to,
from,
next: _next.bind(this)
Expand Down Expand Up @@ -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()
Expand All @@ -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)
Expand Down

0 comments on commit 4b5a035

Please sign in to comment.