refactor(reactivity): simplify isDirty condition (#11933)

This commit is contained in:
Tycho 2024-09-16 09:59:13 +08:00 committed by GitHub
parent 817dca8712
commit 346bfaf760
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View 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
}