Skip to content

Commit

Permalink
fix(data): allow ChangeSetItemFactory to update entities with number …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
allout58 authored and brandonroberts committed Jul 7, 2019
1 parent 30ce2c6 commit f11c7b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/data/src/actions/entity-cache-change-set.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export class ChangeSetItemFactory {
}

/** Create the ChangeSetUpdate for Updates of entities of the given entity type */
update<T extends { id: string }>(
update<T extends { id: string | number }>(
entityName: string,
updates: Update<T> | Update<T>[]
): ChangeSetUpdate<T> {
Expand Down

0 comments on commit f11c7b2

Please sign in to comment.