Skip to content

Commit

Permalink
fix(Entity): Properly iterate over array in upsert (#802)
Browse files Browse the repository at this point in the history
  • Loading branch information
livthomas authored and MikeRyanDev committed Feb 9, 2018
1 parent d537758 commit 779d689
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions modules/entity/src/unsorted_state_adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,7 @@ export function createUnsortedStateAdapter<T>(selectId: IdSelector<T>): any {
const added: T[] = [];
const updated: any[] = [];

for (let index in updates) {
const update = updates[index];
for (const update of updates) {
if (update.id in state.entities) {
updated.push(update);
} else {
Expand Down

0 comments on commit 779d689

Please sign in to comment.