fix split doesn't convert context to string if no argument is passed

This commit is contained in:
isRyven
2020-03-17 16:16:09 +02:00
committed by Tor Andersson
parent 7ebc570d01
commit 625542e463

View File

@@ -665,7 +665,7 @@ static void Sp_split(js_State *J)
{
if (js_isundefined(J, 1)) {
js_newarray(J);
js_copy(J, 0);
js_pushstring(J, js_tostring(J, 0));
js_setindex(J, -2, 0);
} else if (js_isregexp(J, 1)) {
Sp_split_regexp(J);