Index: src/string.js |
diff --git a/src/string.js b/src/string.js |
index 531c6a9b949bbb4c897c761926fcd9164cbbb024..067578c1414d0e422e17b19354f9ae1497b69304 100644 |
--- a/src/string.js |
+++ b/src/string.js |
@@ -530,11 +530,7 @@ function StringSplit(separator, limit) { |
var separator_length = separator.length; |
// If the separator string is empty then return the elements in the subject. |
- if (separator_length === 0) { |
- var result = $Array(length); |
- for (var i = 0; i < length; i++) result[i] = subject[i]; |
- return result; |
- } |
+ if (separator_length === 0) return %StringToArray(subject); |
var result = []; |
var start_index = 0; |