]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
refactor(reactivity): simplify isDirty condition (#11933)
authorTycho <jh.leong@outlook.com>
Mon, 16 Sep 2024 01:59:13 +0000 (09:59 +0800)
committerGitHub <noreply@github.com>
Mon, 16 Sep 2024 01:59:13 +0000 (09:59 +0800)
packages/reactivity/src/effect.ts

index 0c05e06075571fcfdae7586945b0e507e68e87f0..8d323288b6c36f8c8ca7a0e3866041f93846fa9c 100644 (file)
@@ -311,8 +311,9 @@ function isDirty(sub: Subscriber): boolean {
   for (let link = sub.deps; link; link = link.nextDep) {
     if (
       link.dep.version !== link.version ||
-      (link.dep.computed && refreshComputed(link.dep.computed)) ||
-      link.dep.version !== link.version
+      (link.dep.computed &&
+        (refreshComputed(link.dep.computed) ||
+          link.dep.version !== link.version))
     ) {
       return true
     }