Skip to content

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.

3 participants