fix op declaration in simplify comparison operator plugin

This commit is contained in:
Sebastian McKenzie 2015-11-02 19:47:18 +00:00
parent 83dca691d2
commit aeaa4e1d32

View File

@ -2,8 +2,9 @@ export default function () {
return { return {
visitor: { visitor: {
BinaryExpression(path) { BinaryExpression(path) {
let { node, op } = path; let { node } = path;
let op = node.operator;
if (op !== "===" && op !== "!==") return; if (op !== "===" && op !== "!==") return;
let left = path.get("left"); let left = path.get("left");