File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
packages/svelte/src/internal/client Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -184,17 +184,19 @@ export function check_dirtiness(reaction) {
184184 }
185185 }
186186
187- // If we're working with an unowned derived signal, then we need to check
188- // if our dependency write version is higher. If it is then we can assume
189- // that state has changed to a newer version and thus this unowned signal
190- // is also dirty.
191- var version = dependency . version ;
192-
193187 if ( is_unowned ) {
188+ // If we're working with an unowned derived signal, then we need to check
189+ // if our dependency write version is higher. If it is then we can assume
190+ // that state has changed to a newer version and thus this unowned signal
191+ // is also dirty.
192+ var version = dependency . version ;
193+
194194 if ( version > /** @type {import('#client').Derived } */ ( reaction ) . version ) {
195195 /** @type {import('#client').Derived } */ ( reaction ) . version = version ;
196196 return true ;
197- } else if ( ! current_skip_reaction && ! dependency ?. reactions ?. includes ( reaction ) ) {
197+ }
198+
199+ if ( ! current_skip_reaction && ! dependency ?. reactions ?. includes ( reaction ) ) {
198200 // If we are working with an unowned signal as part of an effect (due to !current_skip_reaction)
199201 // and the version hasn't changed, we still need to check that this reaction
200202 // if linked to the dependency source – otherwise future updates will not be caught.
You can’t perform that action at this time.
0 commit comments