Skip to content

Commit

Permalink
refactor: extracting variable for next dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Dec 29, 2024
1 parent b4e386f commit f0c934e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,9 @@ export function startTrack(sub: Subscriber): void {
export function endTrack(sub: Subscriber): void {
const depsTail = sub.depsTail;
if (depsTail !== undefined) {
if (depsTail.nextDep !== undefined) {
clearTrack(depsTail.nextDep);
const nextDep = depsTail.nextDep;
if (nextDep !== undefined) {
clearTrack(nextDep);
depsTail.nextDep = undefined;
}
} else if (sub.deps !== undefined) {
Expand Down

0 comments on commit f0c934e

Please sign in to comment.