Skip to content

Commit

Permalink
fix bug in prefer-map where _ isn't lodash
Browse files Browse the repository at this point in the history
  • Loading branch information
ganimomer committed Feb 7, 2016
1 parent 8b90c7a commit 8892139
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rules/prefer-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = function (context) {
function onlyHasPush(func) {
var firstLine = astUtil.getFirstFunctionLine(func);
var exp = func && func.type === 'ArrowFunctionExpression' ? firstLine : firstLine && firstLine.expression;
return astUtil.hasOnlyOneStatement(func) && astUtil.getMethodName(exp) === 'push';
return func && astUtil.hasOnlyOneStatement(func) && astUtil.getMethodName(exp) === 'push';
}

return {
Expand Down

0 comments on commit 8892139

Please sign in to comment.