Skip to content

Commit

Permalink
Update tc39-proposal-signals-alien-polyfill.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Jan 20, 2025
1 parent 677dfa9 commit 6396cfc
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/frameworks/tc39-proposal-signals-alien-polyfill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,17 @@ export namespace Signal {
}

getPending() {
return introspectSources(this).filter(
(source) =>
const arr: AnySignal[] = [];
for (let link = this.deps; link !== undefined; link = link.nextDep) {
const source = link.dep;
if (
source instanceof Computed &&
source.flags & (alien.SubscriberFlags.PendingComputed | alien.SubscriberFlags.Dirty),
);
source.flags & (alien.SubscriberFlags.PendingComputed | alien.SubscriberFlags.Dirty)
) {
arr.push(link.dep as AnySignal);
}
}
return arr;
}
}

Expand Down

0 comments on commit 6396cfc

Please sign in to comment.