Skip to content

Commit

Permalink
fix(combineSelectors): Remove default parameter from function signatu…
Browse files Browse the repository at this point in the history
…re for Closure
  • Loading branch information
ukrukarg authored and MikeRyanDev committed Aug 24, 2017
1 parent bf14d67 commit ae7d5e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/store/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export function combineReducers(

const finalReducerKeys = Object.keys(finalReducers);

return function combination(state = initialState, action) {
return function combination(state, action) {
state = state || initialState;
let hasChanged = false;
const nextState: any = {};
for (let i = 0; i < finalReducerKeys.length; i++) {
Expand Down

3 comments on commit ae7d5e1

@alex-okrushko
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this was ever an issue.

@MikeRyanDev
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alex-okrushko Do you mean this wasn't an issue when compiling NgRx apps with Closure?

@alex-okrushko
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, i don't think this was the problem. Most of Google is still on ngrx v2 and it has similar approach https://github.com/ngrx/store/blob/master/src/utils.ts#L16

Please sign in to comment.