Skip to content

Commit

Permalink
fix error where callee doesn't have an object
Browse files Browse the repository at this point in the history
  • Loading branch information
ganimomer committed Aug 23, 2015
1 parent 38e1a35 commit 6f66695
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/util/lodashUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function isChainable(node) {
}

function isLodashChainStart(node) {
return node && node.type === 'CallExpression' && (node.callee.name === '_' || (node.callee.object.name === '_' && astUtil.getMethodName(node) === 'chain'));
return node && node.type === 'CallExpression' && (node.callee.name === '_' || (_.get(node, 'callee.object.name') === '_' && astUtil.getMethodName(node) === 'chain'));
}


Expand Down

0 comments on commit 6f66695

Please sign in to comment.