Skip to content

Commit

Permalink
fix(store-reference): type casting in set method
Browse files Browse the repository at this point in the history
  • Loading branch information
alimd committed Dec 26, 2023
1 parent 7b1b34d commit 81f0ef2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/store-reference/src/collection-reference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ export class CollectionReference<TItem extends Dictionary = Dictionary> {
*/
set(id: string | number, data: TItem): void {
this.logger_.logMethodArgs?.('set', {id, data});
this.item_(id).data = data;
(this.item_(id).data as unknown) = data;
this.updated__(id);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/store-reference/src/document-reference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export class DocumentReference<TDoc extends Dictionary = Dictionary> {
*/
set(data: TDoc): void {
this.logger_.logMethodArgs?.('set', data);
this.context__.data = data;
(this.context__.data as unknown) = data;
this.updated_();
}

Expand Down

0 comments on commit 81f0ef2

Please sign in to comment.