Skip to content

Commit f0e1efd

Browse files
committed
first argument must be fn or undefined
1 parent 0facdbb commit f0e1efd

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/instrument.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -347,9 +347,7 @@ function unliftStore(liftedStore, liftReducer) {
347347
/**
348348
* Redux instrumentation store enhancer.
349349
*/
350-
export default function instrument(monitorReducer, options = {}) {
351-
if (!monitorReducer) { monitorReducer = () => null; }
352-
350+
export default function instrument(monitorReducer = () => null, options = {}) {
353351
return createStore => (reducer, initialState, enhancer) => {
354352

355353
function liftReducer(r) {

test/instrument.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ describe('instrument', () => {
300300
let configuredLiftedStore;
301301

302302
beforeEach(() => {
303-
configuredStore = createStore(counter, instrument(null, { maxAge: 2 }));
303+
configuredStore = createStore(counter, instrument(undefined, { maxAge: 2 }));
304304
configuredLiftedStore = configuredStore.liftedStore;
305305
});
306306

0 commit comments

Comments
 (0)