Skip to content

Commit 9019879

Browse files
committed
Improve useFactory inter file function detection
1 parent 477f32c commit 9019879

File tree

1 file changed

+2
-2
lines changed
  • javascript/ql/lib/semmle/javascript/frameworks

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -523,10 +523,10 @@ module NestJS {
523523
result = tuple.getAPropertyWrite("useClass").getRhs()
524524
or
525525
exists(DataFlow::FunctionNode f |
526-
f = tuple.getAPropertyWrite("useFactory").getRhs().getALocalSource() and
526+
f = tuple.getAPropertyWrite("useFactory").getRhs().getAFunctionValue() and
527527
result.getAstNode() = f.getFunction().getAReturnedExpr().getType().(ClassType).getClass()
528528
)
529-
or
529+
or
530530
result.getAstNode() =
531531
tuple.getAPropertyWrite("useValue").getRhs().asExpr().getType().(ClassType).getClass()
532532
}

0 commit comments

Comments
 (0)