mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-11 04:07:34 +03:00
Throw if the reducer passed to replaceReducer()
is not a function
This commit is contained in:
parent
a370d49eec
commit
d756384b6c
|
@ -336,6 +336,9 @@ function unliftStore(liftedStore, liftReducer) {
|
|||
export default function instrument(monitorReducer = () => null) {
|
||||
return createStore => (reducer, initialState, enhancer) => {
|
||||
function liftReducer(r) {
|
||||
if (typeof r !== 'function') {
|
||||
throw new Error('Expected the nextReducer to be a function.')
|
||||
}
|
||||
return liftReducerWith(r, initialState, monitorReducer);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user