Ensure _.concat returns an empty array for nullish array values. [closes #1856]

This commit is contained in:
John-David Dalton
2016-01-21 01:13:21 -06:00
parent 345746f7ab
commit 78982f3074
2 changed files with 18 additions and 0 deletions

View File

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