mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-25 11:03:57 +03:00
first argument must be fn or undefined
This commit is contained in:
parent
0facdbbc9f
commit
f0e1efdcc2
|
@ -347,9 +347,7 @@ function unliftStore(liftedStore, liftReducer) {
|
||||||
/**
|
/**
|
||||||
* Redux instrumentation store enhancer.
|
* Redux instrumentation store enhancer.
|
||||||
*/
|
*/
|
||||||
export default function instrument(monitorReducer, options = {}) {
|
export default function instrument(monitorReducer = () => null, options = {}) {
|
||||||
if (!monitorReducer) { monitorReducer = () => null; }
|
|
||||||
|
|
||||||
return createStore => (reducer, initialState, enhancer) => {
|
return createStore => (reducer, initialState, enhancer) => {
|
||||||
|
|
||||||
function liftReducer(r) {
|
function liftReducer(r) {
|
||||||
|
|
|
@ -300,7 +300,7 @@ describe('instrument', () => {
|
||||||
let configuredLiftedStore;
|
let configuredLiftedStore;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
configuredStore = createStore(counter, instrument(null, { maxAge: 2 }));
|
configuredStore = createStore(counter, instrument(undefined, { maxAge: 2 }));
|
||||||
configuredLiftedStore = configuredStore.liftedStore;
|
configuredLiftedStore = configuredStore.liftedStore;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user