Skip to content

Commit

Permalink
fix: resolver's input #10 (1.0.1)
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugene Rodionov committed Aug 21, 2015
1 parent 2451e8e commit 980633d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 17 deletions.
18 changes: 10 additions & 8 deletions build/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,17 @@ var _logger = require('./logger');
var _logger2 = _interopRequireDefault(_logger);

function resolver(input) {
var dispatch = input.dispatch;

console.log(input);

if (dispatch) {
console.warn('redux-logger updated to 1.0.0 and old `logger` is deprecated, check out https://github.com/fcomb/redux-logger/releases/tag/1.0.0');
return (0, _logger2['default'])(input);
if (input) {
var dispatch = input.dispatch;

if (dispatch) {
console.warn('redux-logger updated to 1.0.0 and old `logger` is deprecated, check out https://github.com/fcomb/redux-logger/releases/tag/1.0.0');
return (0, _logger2['default'])(input);
} else {
return (0, _createLogger2['default'])(input);
}
} else {
return (0, _createLogger2['default'])(input);
return (0, _createLogger2['default'])();
}
}

Expand Down
2 changes: 1 addition & 1 deletion example/dist/bundle.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "redux-logger",
"version": "1.0.0",
"version": "1.0.1",
"description": "Logger for redux",
"main": "build/index.js",
"scripts": {
Expand All @@ -12,7 +12,7 @@
"build": "npm run build:module && npm run build:example",
"prepublish": "npm run clean && npm run test && npm run build",
"deploy:ghpages": "$(npm bin)/gh-pages -d example/dist",
"deploy": "npm run build && git add -A && git commit -am 'chore: update docs' && git push && npm run deploy:ghpages"
"deploy": "git add -A && git commit -am 'chore: update docs' && git push && npm run deploy:ghpages"
},
"repository": {
"type": "git",
Expand Down
15 changes: 9 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@ import createLogger from './createLogger';
import logger from './logger';

function resolver(input) {
const { dispatch } = input;
console.log(input);
if (input) {
const { dispatch } = input;

if (dispatch) {
console.warn('redux-logger updated to 1.0.0 and old `logger` is deprecated, check out https://github.com/fcomb/redux-logger/releases/tag/1.0.0');
return logger(input);
if (dispatch) {
console.warn('redux-logger updated to 1.0.0 and old `logger` is deprecated, check out https://github.com/fcomb/redux-logger/releases/tag/1.0.0');
return logger(input);
} else {
return createLogger(input);
}
} else {
return createLogger(input);
return createLogger();
}
}

Expand Down

0 comments on commit 980633d

Please sign in to comment.