File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
packages/core/src/runtime Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -20,8 +20,20 @@ const isBuiltIn = type => {
2020 return BUILT_IN_COMPONENTS . includes ( type . name ) ;
2121} ;
2222
23- const oldVnode = options . __b ;
24- options . __b = vnode => {
23+ const oldVnode = options . vnode ;
24+ options . vnode = vnode => {
25+ if ( vnode && typeof vnode . type === 'function' && ! isBuiltIn ( vnode . type ) ) {
26+ const vnodes = vnodesForComponent . get ( vnode . type ) ;
27+ if ( ! vnodes ) {
28+ vnodesForComponent . set ( vnode . type , [ vnode ] ) ;
29+ }
30+ }
31+
32+ if ( oldVnode ) oldVnode ( vnode ) ;
33+ } ;
34+
35+ const oldDiff = options . _diff ;
36+ options . _diff = vnode => {
2537 if ( vnode && typeof vnode . type === 'function' && ! isBuiltIn ( vnode . type ) ) {
2638 const vnodes = vnodesForComponent . get ( vnode . type ) ;
2739 if ( ! vnodes ) {
@@ -50,7 +62,7 @@ options.__b = vnode => {
5062 }
5163 }
5264
53- if ( oldVnode ) oldVnode ( vnode ) ;
65+ if ( oldDiff ) oldDiff ( vnode ) ;
5466} ;
5567
5668const oldDiffed = options . diffed ;
You can’t perform that action at this time.
0 commit comments