We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c97da2e commit e6f071cCopy full SHA for e6f071c
javascript/ql/lib/Expressions/ExprHasNoEffect.qll
@@ -181,7 +181,7 @@ predicate hasNoEffect(Expr e) {
181
// exclude expressions that are part of a conditional expression
182
not exists(ConditionalExpr cond | e.getParent() = cond |
183
e instanceof NullLiteral or
184
- e instanceof GlobalVarAccess or
+ e.(GlobalVarAccess).getName() = "undefined" or
185
e.(NumberLiteral).getIntValue() = 0 or
186
e.(UnaryExpr).getOperator() = "void"
187
) and
0 commit comments