Skip to content

Commit

Permalink
fix error in isEqEqEq which caused matches-shorthand rule to crash
Browse files Browse the repository at this point in the history
  • Loading branch information
ganimomer committed Jan 26, 2016
1 parent 58df2d2 commit 599e8e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/util/astUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ function isEquivalentExp(a, b) {
* @returns {boolean}
*/
function isEqEqEq(node) {
return node.type === 'BinaryExpression' && node.operator === '===';
return node && node.type === 'BinaryExpression' && node.operator === '===';
}

module.exports = {
Expand Down

0 comments on commit 599e8e7

Please sign in to comment.