Skip to content

Commit 6a99b35

Browse files
fix: keep computed getter be reactive after registering new module
1 parent b7f471a commit 6a99b35

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/store-util.js

+3
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ export function resetStoreState (store, state, hot) {
8282

8383
// dispose previously registered effect scope if there is one.
8484
if (oldScope) {
85+
// Keep the effect that already have dependencies from being killed,
86+
// which will set the existed computed property unreactive.
87+
oldScope.effects = oldScope.effects.filter(({ deps }) => !deps.length)
8588
oldScope.stop()
8689
}
8790
}

0 commit comments

Comments
 (0)