Skip to content

Commit 4d05196

Browse files
authored
chore: tidy up (#11404)
1 parent 9e1e1b4 commit 4d05196

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

packages/svelte/src/internal/client/runtime.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff 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.

0 commit comments

Comments
 (0)