Skip to content

Commit

Permalink
Code review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
divdavem committed Nov 12, 2024
1 parent 4c45668 commit 68ef7d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/internal/storeComputed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ export class RawStoreComputed<T>
let link = producerLinks[producerIndex] as L | undefined;
if (link?.producer !== producer) {
if (link) {
const endIndex = Math.max(producerIndex + 1, producerLinks.length);
producerLinks[endIndex] = link; // push the existing link at the end (to be removed later)
producerLinks.push(link); // push the existing link at the end (to be removed later)
}
link = producer.registerConsumer(producer.newLink(this));
}
Expand Down
2 changes: 1 addition & 1 deletion src/internal/storeConst.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class RawStoreConst<T> implements RawStore<T, BaseLink<T>> {
return link;
}
unregisterConsumer(_link: BaseLink<T>): void {}
updateValue(_link?: BaseLink<T> | undefined): void {}
updateValue(): void {}
isLinkUpToDate(_link: BaseLink<T>): boolean {
return true;
}
Expand Down

0 comments on commit 68ef7d3

Please sign in to comment.