Skip to content

Commit 7fbbf7e

Browse files
authored
Merge pull request #3 from asgerf/js/merge_classes
JS: Avoid duplication with constructor body
2 parents c430a36 + 3575fba commit 7fbbf7e

File tree

1 file changed

+1
-0
lines changed
  • javascript/ql/lib/semmle/javascript/dataflow

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -872,6 +872,7 @@ class ClassNode extends DataFlow::ValueNode, DataFlow::SourceNode {
872872
or
873873
// Function-style class case
874874
astNode instanceof Function and
875+
not astNode = any(ClassDefinition cls).getConstructor().getBody() and
875876
function.getFunction() = astNode and
876877
(
877878
exists(getAFunctionValueWithPrototype(function))

0 commit comments

Comments
 (0)