Skip to content

Commit f11c7b2

Browse files
allout58brandonroberts
authored andcommitted
fix(data): allow ChangeSetItemFactory to update entities with number ids (#1995)
Allow the `update` method of ChangeSetItemFactory to accept entities with numerical IDs. This seems to be the intent, as the `Update<T>` it accepts can use either a string or a number for the ID, while the `update` method only allows for string IDs Closes #1988
1 parent 30ce2c6 commit f11c7b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/data/src/actions/entity-cache-change-set.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export class ChangeSetItemFactory {
8585
}
8686

8787
/** Create the ChangeSetUpdate for Updates of entities of the given entity type */
88-
update<T extends { id: string }>(
88+
update<T extends { id: string | number }>(
8989
entityName: string,
9090
updates: Update<T> | Update<T>[]
9191
): ChangeSetUpdate<T> {

0 commit comments

Comments
 (0)