Skip to content

Commit

Permalink
refactor: remove unneeded flags check in processComputedUpdate
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Jan 23, 2025
1 parent 4416886 commit f380caf
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,17 +274,15 @@ export function createReactiveSystem({
shallowPropagate(subs);
}
}
} else if (flags & SubscriberFlags.PendingComputed) {
if (checkDirty(computed.deps!)) {
if (updateComputed(computed)) {
const subs = computed.subs;
if (subs !== undefined) {
shallowPropagate(subs);
}
} else if (checkDirty(computed.deps!)) {
if (updateComputed(computed)) {
const subs = computed.subs;
if (subs !== undefined) {
shallowPropagate(subs);
}
} else {
computed.flags = flags & ~SubscriberFlags.PendingComputed;
}
} else {
computed.flags = flags & ~SubscriberFlags.PendingComputed;
}
},
/**
Expand Down

0 comments on commit f380caf

Please sign in to comment.