Skip to content

Commit 07e794f

Browse files
committed
JS: Update API usage in ClassValidator
1 parent 888c327 commit 07e794f

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

javascript/ql/lib/semmle/javascript/frameworks/ClassValidator.qll

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
*/
44

55
import javascript
6-
private import semmle.javascript.internal.NameResolution
7-
private import semmle.javascript.internal.TypeResolution
8-
private import semmle.javascript.internal.UnderlyingTypes
96

107
/**
118
* Provides predicates for reasoning about sanitization via the `class-validator` library.
@@ -53,10 +50,7 @@ module ClassValidator {
5350

5451
pragma[noinline]
5552
private ClassDefinition getClassReferencedByPropRead(DataFlow::PropRead read) {
56-
exists(NameResolution::Node type |
57-
TypeResolution::valueHasType(read.getBase().asExpr(), type) and
58-
UnderlyingTypes::nodeHasUnderlyingClassType(type, result.flow())
59-
)
53+
result = read.getBase().asExpr().getTypeBinding().getAnUnderlyingClass().getAstNode()
6054
}
6155

6256
/**

0 commit comments

Comments
 (0)