mirror of
https://github.com/github/codeql.git
synced 2026-05-03 04:39:29 +02:00
JS: recognize binding decorators on classes
This commit is contained in:
@@ -45,7 +45,11 @@ private predicate isBoundInMethod(MethodDeclaration method) {
|
||||
)
|
||||
or
|
||||
exists (Expr decoration, string name |
|
||||
decoration = method.getADecorator().getExpression() and
|
||||
(
|
||||
decoration = method.getADecorator().getExpression()
|
||||
or
|
||||
decoration = method.getDeclaringType().(ClassDefinition).getADecorator().getExpression()
|
||||
) and
|
||||
name.regexpMatch("(?i).*(bind|bound).*") |
|
||||
// @autobind
|
||||
decoration.(Identifier).getName() = name or
|
||||
|
||||
Reference in New Issue
Block a user