From 599e8e7b57aa6d5cafcaef3a5467cabb8f30d451 Mon Sep 17 00:00:00 2001 From: Omer Ganim Date: Tue, 26 Jan 2016 14:59:30 +0200 Subject: [PATCH] fix error in isEqEqEq which caused matches-shorthand rule to crash --- lib/util/astUtil.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util/astUtil.js b/lib/util/astUtil.js index ecff275..62dc2ba 100644 --- a/lib/util/astUtil.js +++ b/lib/util/astUtil.js @@ -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 = {