File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
packages/svelte/src/reactivity Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -102,10 +102,12 @@ export class SvelteMap extends Map {
102
102
increment ( version ) ;
103
103
} else if ( prev_res !== value ) {
104
104
increment ( s ) ;
105
- // If no one listening to this property yet, but version is
106
- // being listened to, then also increment version to keep
107
- // those cases in sync
108
- if ( s . reactions === null || version . reactions === null ) {
105
+ // If no one listening to this property and is listening to the version, or
106
+ // the inverse, then we should increment the version to be safe
107
+ if (
108
+ ( s . reactions === null && version . reactions !== null ) ||
109
+ ( s . reactions !== null && version . reactions === null )
110
+ ) {
109
111
increment ( version ) ;
110
112
}
111
113
}
You can’t perform that action at this time.
0 commit comments