Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(utils): meta reducers conflicting with initial state #252

Merged

Conversation

rjokelai
Copy link
Contributor

@rjokelai rjokelai commented Aug 9, 2017

Closes #247

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 91.452% when pulling 0a52de9 on rjokelai:fix-meta-reducer-with-initial-state-#247 into 0fc1bcc on ngrx:master.

@@ -89,7 +89,7 @@ export function createReducerFactory(
metaReducers?: ActionReducer<any, any>[]
): ActionReducerFactory<any, any> {
if (Array.isArray(metaReducers) && metaReducers.length > 0) {
return compose.apply(null, [...metaReducers, reducerFactory]);
return compose(...metaReducers)(reducerFactory) as any;
Copy link
Member

@brandonroberts brandonroberts Aug 10, 2017

Choose a reason for hiding this comment

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

If you're going to double type it, use as ActionReducerFactory<any, any>

Copy link
Member

@brandonroberts brandonroberts left a comment

Choose a reason for hiding this comment

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

Fix double type

@brandonroberts brandonroberts self-assigned this Aug 10, 2017
@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 91.452% when pulling b4577f3 on rjokelai:fix-meta-reducer-with-initial-state-#247 into 0fc1bcc on ngrx:master.

@brandonroberts brandonroberts merged commit 683013c into ngrx:master Aug 11, 2017
@brandonroberts
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants