Skip to content

Commit cb19558

Browse files
fix(overmind-vue): stop tracking when component updated
1 parent f420a24 commit cb19558

File tree

1 file changed

+7
-1
lines changed
  • packages/node_modules/overmind-vue/src

1 file changed

+7
-1
lines changed

packages/node_modules/overmind-vue/src/index.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,11 @@ function createMixin(overmind, propsCallback) {
6363
this[OVERMIND].tree.track(this[OVERMIND].onUpdate)
6464
},
6565
...(IS_PRODUCTION
66-
? null
66+
? {
67+
updated(this: any) {
68+
this[OVERMIND].tree.stopTracking()
69+
},
70+
}
6771
: {
6872
mounted(this: any) {
6973
if (overmind.mode.mode === MODE_SSR) return
@@ -78,6 +82,8 @@ function createMixin(overmind, propsCallback) {
7882
updated(this: any) {
7983
if (overmind.mode.mode === MODE_SSR) return
8084

85+
this[OVERMIND].tree.stopTracking()
86+
8187
overmind.eventHub.emitAsync(EventType.COMPONENT_UPDATE, {
8288
componentId,
8389
componentInstanceId: this[OVERMIND].componentInstanceId,

0 commit comments

Comments
 (0)