Skip to content

Commit 8200a35

Browse files
committed
register router-view instance on reuse via prepatch hook (fix #1322, #1338)
1 parent f28bf0c commit 8200a35

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: src/components/view.js

+4
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ export default {
5454
}
5555
}
5656

57+
;(data.hook || (data.hook = {})).prepatch = (_, vnode) => {
58+
matched.instances[name] = vnode.componentInstance
59+
}
60+
5761
// resolve props
5862
data.props = resolveProps(route, matched.props && matched.props[name])
5963

0 commit comments

Comments
 (0)