Skip to content

Commit

Permalink
Update system.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Jan 2, 2025
1 parent cfb16a0 commit 20c4f6e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/reactivity/src/system.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Ported from https://github.com/stackblitz/alien-signals/blob/v0.4.10/src/system.ts
// Ported from https://github.com/stackblitz/alien-signals/blob/v0.4.12/src/system.ts

export interface IEffect extends Subscriber {
nextNotify: IEffect | undefined
Expand Down Expand Up @@ -342,8 +342,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 20c4f6e

Please sign in to comment.