We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f586639 commit 4a26c29Copy full SHA for 4a26c29
1 file changed
javascript/ql/src/semmle/javascript/StandardLibrary.qll
@@ -151,12 +151,12 @@ class StringReplaceCall extends DataFlow::MethodCallNode {
151
* A call to `String.prototype.split`.
152
*
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.
+ * has one or two arguments, or local data flow suggests that the receiver may be a string.
155
*/
156
class StringSplitCall extends DataFlow::MethodCallNode {
157
StringSplitCall() {
158
this.getMethodName() = "split" and
159
- (getNumArgument() = 1 or getReceiver().mayHaveStringValue(_))
+ (getNumArgument() = [1,2] or getReceiver().mayHaveStringValue(_))
160
}
161
162
/**
0 commit comments