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: Throw error if createStore is passed several enhancers #3151

Merged
merged 1 commit into from Sep 27, 2018

Conversation

selbekk
Copy link
Contributor

@selbekk selbekk commented Sep 27, 2018

This commit adds a check for whether the user is passing several
enhancers to the createStore function.

Fixes #3114.

@selbekk
Copy link
Contributor Author

selbekk commented Sep 27, 2018

I added two checks - one if you're passing something like

createStore(reducer, func, anotherFunc) // throws

, and another one if you pass initial state as well:

createStore(reducer, { initial: 'state' }, func, anotherFunc) // throws

I'm up for changing whatever - but I'd love some feedback first!

@selbekk selbekk force-pushed the 3114-add-sanity-check-for-enhancers branch from 3ea269a to 61669bc Compare September 27, 2018 06:41
This commit adds a check for whether the user is passing several
enhancers to the `createStore` function.

Fixes reduxjs#3114.
@selbekk selbekk force-pushed the 3114-add-sanity-check-for-enhancers branch from 61669bc to 32acbea Compare September 27, 2018 06:47
@markerikson
Copy link
Contributor

Looks good to me.

@timdorr , any objections?

@timdorr
Copy link
Member

timdorr commented Sep 27, 2018

LGTM. Thanks!

@timdorr timdorr merged commit a58aa4e into reduxjs:master Sep 27, 2018
@selbekk selbekk deleted the 3114-add-sanity-check-for-enhancers branch September 28, 2018 08:38
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.

None yet

3 participants