File tree Expand file tree Collapse file tree 2 files changed +1
-4
lines changed
javascript/ql/lib/semmle/javascript Expand file tree Collapse file tree 2 files changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ class StringReplaceCall extends DataFlow::MethodCallNode {
115
115
* Holds if this is a global replacement, that is, the first argument is a regular expression
116
116
* with the `g` flag, or this is a call to `.replaceAll()`.
117
117
*/
118
- predicate isGlobal ( ) { this .getRegExp ( ) .isGlobal ( ) or this .getMethodName ( ) = "replaceAll" }
118
+ predicate isGlobal ( ) { RegExp :: isGlobal ( this .getRegExp ( ) .getFlags ( ) ) or this .getMethodName ( ) = "replaceAll" }
119
119
120
120
/**
121
121
* Holds if this call to `replace` replaces `old` with `new`.
Original file line number Diff line number Diff line change @@ -1682,9 +1682,6 @@ class RegExpCreationNode extends DataFlow::SourceNode {
1682
1682
result = this .( RegExpLiteralNode ) .getFlags ( )
1683
1683
}
1684
1684
1685
- /** Holds if the constructed predicate has the `g` flag. */
1686
- predicate isGlobal ( ) { RegExp:: isGlobal ( this .getFlags ( ) ) }
1687
-
1688
1685
/** Gets a data flow node referring to this regular expression. */
1689
1686
private DataFlow:: SourceNode getAReference ( DataFlow:: TypeTracker t ) {
1690
1687
t .start ( ) and
You can’t perform that action at this time.
0 commit comments