Fix confusing and/or incorrect condition in linter (#446)

This commit is contained in:
u9g 2023-06-15 02:09:05 -04:00 committed by GitHub
parent ffa2895e5a
commit 631062514c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -55,8 +55,9 @@ impl Rule for EqEqEq {
matches!(unary_expr.operator, UnaryOperator::Typeof)
}
(lhs, rhs) => {
(lhs.is_null() || rhs.is_null())
|| lhs.is_literal_expression() && rhs.is_literal_expression()
lhs.is_null()
|| rhs.is_null()
|| (lhs.is_literal_expression() && rhs.is_literal_expression())
}
};