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 (ngrx#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 ngrx#1988
  • Loading branch information
allout58 authored and jordanpowell88 committed Nov 14, 2019
1 parent 612cc65 commit acde23e
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 acde23e

Please sign in to comment.