Skip to content

Commit 346bfaf

Browse files
authored
refactor(reactivity): simplify isDirty condition (#11933)
1 parent 817dca8 commit 346bfaf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/reactivity/src/effect.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,9 @@ function isDirty(sub: Subscriber): boolean {
311311
for (let link = sub.deps; link; link = link.nextDep) {
312312
if (
313313
link.dep.version !== link.version ||
314-
(link.dep.computed && refreshComputed(link.dep.computed)) ||
315-
link.dep.version !== link.version
314+
(link.dep.computed &&
315+
(refreshComputed(link.dep.computed) ||
316+
link.dep.version !== link.version))
316317
) {
317318
return true
318319
}

0 commit comments

Comments
 (0)