Skip to content

Commit e6f071c

Browse files
Napalysasgerf
andauthored
Update javascript/ql/lib/Expressions/ExprHasNoEffect.qll
Co-authored-by: Asger F <[email protected]>
1 parent c97da2e commit e6f071c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

javascript/ql/lib/Expressions/ExprHasNoEffect.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ predicate hasNoEffect(Expr e) {
181181
// exclude expressions that are part of a conditional expression
182182
not exists(ConditionalExpr cond | e.getParent() = cond |
183183
e instanceof NullLiteral or
184-
e instanceof GlobalVarAccess or
184+
e.(GlobalVarAccess).getName() = "undefined" or
185185
e.(NumberLiteral).getIntValue() = 0 or
186186
e.(UnaryExpr).getOperator() = "void"
187187
) and

0 commit comments

Comments
 (0)