Skip to content

Commit 429791e

Browse files
jh-leongabdullah-wn
authored andcommitted
refactor(reactivity): simplify isDirty condition (vuejs#11933)
1 parent 0050e7c commit 429791e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/reactivity/src/effect.ts

Lines changed: 3 additions & 2 deletions
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)