fix spread not returning a new array with a single spread element
This commit is contained in:
@@ -4,4 +4,4 @@ var _toArray = function (arr) {
|
||||
return Array.isArray(arr) ? arr : Array.from(arr);
|
||||
};
|
||||
|
||||
var lyrics = _toArray(parts).concat(["head", "and", "toes"]);
|
||||
var lyrics = [].concat(_toArray(parts), ["head", "and", "toes"]);
|
||||
|
||||
@@ -4,4 +4,4 @@ var _toArray = function (arr) {
|
||||
return Array.isArray(arr) ? arr : Array.from(arr);
|
||||
};
|
||||
|
||||
_toArray(foo);
|
||||
[].concat(_toArray(foo));
|
||||
|
||||
Reference in New Issue
Block a user