Skip to content

Commit

Permalink
fix(store): fix Object.keys being called on null or undefined
Browse files Browse the repository at this point in the history
This should mitigate ngrx#250
  • Loading branch information
David-Mueller authored May 28, 2018
1 parent 97cda1c commit 529fe7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/store/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function combineReducers(
reducers: any,
initialState: any = {}
): ActionReducer<any, Action> {
const reducerKeys = Object.keys(reducers);
const reducerKeys = reducers ? Object.keys(reducers) : [];
const finalReducers: any = {};

for (let i = 0; i < reducerKeys.length; i++) {
Expand Down

0 comments on commit 529fe7b

Please sign in to comment.