File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,10 @@ export default class VueApp<
9696 // a callback that runs whenever a mutation
9797 // matches the paths tracked on this component
9898 componentOptions . mounted = function ( ) {
99- const paths = instance . clearTrackState ( this . __trackId )
99+ const vueInstance = this
100+ const paths = instance . clearTrackState ( this . __trackId , ( ) => {
101+ mounted && mounted . call ( vueInstance )
102+ } )
100103 instance . eventHub . emitAsync ( EventType . COMPONENT_ADD , {
101104 componentId,
102105 componentInstanceId : this . __componentInstanceId ,
@@ -130,7 +133,6 @@ export default class VueApp<
130133 paths : Array . from ( paths ) ,
131134 } )
132135 }
133- mounted && mounted . call ( this )
134136 }
135137
136138 // When unmounting the component we dispose
Original file line number Diff line number Diff line change @@ -685,8 +685,8 @@ export default class App<
685685 trackState ( ) {
686686 return this . proxyStateTree . startPathsTracking ( )
687687 }
688- clearTrackState ( id : number ) {
689- return this . proxyStateTree . clearPathsTracking ( id )
688+ clearTrackState ( id : number , cb ?: ( ) => void ) {
689+ return this . proxyStateTree . clearPathsTracking ( id , cb )
690690 }
691691 addMutationListener ( paths , cb ) {
692692 return this . proxyStateTree . addMutationListener ( paths , cb )
You can’t perform that action at this time.
0 commit comments