Skip to content

Commit

Permalink
fix(Entity): Do not store null entity keys
Browse files Browse the repository at this point in the history
  • Loading branch information
livthomas committed Feb 4, 2018
1 parent a140fa9 commit f30509c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions modules/entity/src/unsorted_state_adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ export function createUnsortedStateAdapter<T>(selectId: IdSelector<T>): any {
function addManyMutably(entities: any[], state: any): DidMutate {
let didMutate = false;

for (let index in entities) {
didMutate =
addOneMutably(entities[index], state) !== DidMutate.None || didMutate;
for (const entity of entities) {
didMutate = addOneMutably(entity, state) !== DidMutate.None || didMutate;
}

return didMutate ? DidMutate.Both : DidMutate.None;
Expand Down

0 comments on commit f30509c

Please sign in to comment.