mirror of
https://github.com/github/codeql.git
synced 2026-04-28 18:25:24 +02:00
JS: fixup optional chaining on CallWithNonLocalAnalyzedReturnFlow
This commit is contained in:
@@ -157,6 +157,10 @@ abstract class CallWithNonLocalAnalyzedReturnFlow extends DataFlow::AnalyzedValu
|
||||
|
||||
override AbstractValue getAValue() {
|
||||
result = getACallee().getAReturnValue()
|
||||
or
|
||||
// special case from the local layer (could be more precise if it is inferred that the callee is not `null`/`undefined`)
|
||||
astNode instanceof OptionalChainRoot and
|
||||
result = TAbstractUndefined()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user