From: Tycho Date: Mon, 16 Sep 2024 01:59:13 +0000 (+0800) Subject: refactor(reactivity): simplify isDirty condition (#11933) X-Git-Tag: v3.5.6~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=346bfaf760bb3e2eda610397d10da23f69679740;p=thirdparty%2Fvuejs%2Fcore.git refactor(reactivity): simplify isDirty condition (#11933) --- diff --git a/packages/reactivity/src/effect.ts b/packages/reactivity/src/effect.ts index 0c05e06075..8d323288b6 100644 --- a/packages/reactivity/src/effect.ts +++ b/packages/reactivity/src/effect.ts @@ -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 }