Ensure _.concat casts non-array array values to arrays.

This commit is contained in:
John-David Dalton
2016-03-28 12:34:09 -07:00
parent 2ddd893ca2
commit a7bf3352df
2 changed files with 17 additions and 1 deletions

View File

@@ -5855,7 +5855,7 @@
*/
var concat = rest(function(array, values) {
if (!isArray(array)) {
array = array == null ? [] : [Object(array)];
array = array == null ? [] : [array];
}
values = baseFlatten(values, 1);
return arrayConcat(array, values);