Skip to content

Commit f94f82a

Browse files
committed
use getAChainedMethodCall
1 parent 38a9c71 commit f94f82a

File tree

1 file changed

+6
-6
lines changed
  • javascript/ql/src/semmle/javascript/frameworks

1 file changed

+6
-6
lines changed

javascript/ql/src/semmle/javascript/frameworks/Koa.qll

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,12 @@ module Koa {
142142

143143
RoutedRouteHandler() {
144144
router = DataFlow::moduleImport(["@koa/router", "koa-router"]).getAnInvocation() and
145-
call = router.getAMethodCall*() and
146-
call.getMethodName() =
147-
[
148-
"use", "get", "post", "put", "link", "unlink", "delete", "del", "head", "options",
149-
"patch", "all"
150-
] and
145+
call =
146+
router
147+
.getAChainedMethodCall([
148+
"use", "get", "post", "put", "link", "unlink", "delete", "del", "head", "options",
149+
"patch", "all"
150+
]) and
151151
this.flowsTo(call.getArgument(any(int i | i >= 1)))
152152
}
153153

0 commit comments

Comments
 (0)