Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 623557b

Browse files
committed
JS: "this" in a template is not the global object
1 parent ee33c59 commit 623557b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • javascript/ql/src/semmle/javascript/dataflow

javascript/ql/src/semmle/javascript/dataflow/Nodes.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,8 @@ DataFlow::SourceNode globalObjectRef() {
374374
// top-level `this`
375375
exists(StmtContainer sc |
376376
sc = result.(ThisNode).getBindingContainer() and
377-
not sc instanceof Function
377+
not sc instanceof Function and
378+
not sc instanceof Templating::TemplateTopLevel
378379
)
379380
or
380381
// DOM

0 commit comments

Comments
 (0)