From aeaa4e1d32e60d59a140ba5ec6768ece3575d7bb Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Mon, 2 Nov 2015 19:47:18 +0000 Subject: [PATCH] fix op declaration in simplify comparison operator plugin --- .../src/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/babel-plugin-transform-simplify-comparison-operators/src/index.js b/packages/babel-plugin-transform-simplify-comparison-operators/src/index.js index 962fcf8c86..c7735c751b 100644 --- a/packages/babel-plugin-transform-simplify-comparison-operators/src/index.js +++ b/packages/babel-plugin-transform-simplify-comparison-operators/src/index.js @@ -2,8 +2,9 @@ export default function () { return { visitor: { BinaryExpression(path) { - let { node, op } = path; + let { node } = path; + let op = node.operator; if (op !== "===" && op !== "!==") return; let left = path.get("left");