File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
javascript/ql/src/semmle/javascript Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -151,12 +151,12 @@ class StringReplaceCall extends DataFlow::MethodCallNode {
151
151
* A call to `String.prototype.split`.
152
152
*
153
153
* We heuristically include any call to a method called `split`, provided it either
154
- * has exactly one arguments, or local data flow suggests that the receiver may be a string.
154
+ * has one or two arguments, or local data flow suggests that the receiver may be a string.
155
155
*/
156
156
class StringSplitCall extends DataFlow:: MethodCallNode {
157
157
StringSplitCall ( ) {
158
158
this .getMethodName ( ) = "split" and
159
- ( getNumArgument ( ) = 1 or getReceiver ( ) .mayHaveStringValue ( _) )
159
+ ( getNumArgument ( ) = [ 1 , 2 ] or getReceiver ( ) .mayHaveStringValue ( _) )
160
160
}
161
161
162
162
/**
You can’t perform that action at this time.
0 commit comments