Skip to content

Commit

Permalink
fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
omnidan committed Sep 26, 2015
1 parent 0e887ec commit df5d43b
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,17 @@ function createHistory(state) {
}
// /createHistory

// parseActions
export function parseActions(rawActions, defaultValue = []) {
if (Array.isArray(rawActions)) {
return rawActions;
} else if (typeof rawActions === 'string') {
return [rawActions];
}
return defaultValue;
}
// /parseActions

// redux-undo higher order reducer
export default function undoable(reducer, rawConfig = {}) {
__DEBUG__ = rawConfig.debug;
Expand Down Expand Up @@ -182,7 +193,7 @@ export default function undoable(reducer, rawConfig = {}) {
return {
...state,
present: res,
history: createHistory(res)
history: createHistory(res),
};
}

Expand Down Expand Up @@ -212,17 +223,6 @@ export default function undoable(reducer, rawConfig = {}) {
}
// /redux-undo

// parseActions
export function parseActions(rawActions, defaultValue = []) {
if (Array.isArray(rawActions)) {
return rawActions;
} else if (typeof rawActions === 'string') {
return [rawActions];
}
return defaultValue;
}
// /parseActions

// distinctState helper
export function distinctState() {
return (action, currentState, previousState) => currentState !== previousState;
Expand Down

0 comments on commit df5d43b

Please sign in to comment.