Skip to content

Commit 1435ffc

Browse files
committed
Fix noLogger ordering
1 parent d0fb80e commit 1435ffc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@ function createLogger(options = {}) {
6969
return emptyLogger();
7070
}
7171

72-
// Return if 'console' object is not defined
73-
if (noLogger(options)) return emptyLogger();
74-
7572
const loggerOptions = {
7673
...defaults,
7774
...options,
7875
};
7976

77+
// Return if 'console' object is not defined
78+
if (noLogger(loggerOptions)) return emptyLogger();
79+
8080
return ({ getState }) => next => (action) => {
8181
// Exit early if predicate function returns 'false'
8282
if (shouldNotLog(getState, action)) return next(action);

0 commit comments

Comments
 (0)