From 779d68903c021b89afd3bfa54424c5de236f42a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Livora?= Date: Fri, 9 Feb 2018 16:26:52 +0100 Subject: [PATCH] fix(Entity): Properly iterate over array in upsert (#802) --- modules/entity/src/unsorted_state_adapter.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/entity/src/unsorted_state_adapter.ts b/modules/entity/src/unsorted_state_adapter.ts index c2d90ff4bc..3bd62f63ce 100644 --- a/modules/entity/src/unsorted_state_adapter.ts +++ b/modules/entity/src/unsorted_state_adapter.ts @@ -132,8 +132,7 @@ export function createUnsortedStateAdapter(selectId: IdSelector): 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 {