mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 08:57:49 +00:00
Ensure _.ary treats negative n values as 0.
This commit is contained in:
@@ -6683,7 +6683,7 @@
|
||||
if (guard && isIterateeCall(func, n, guard)) {
|
||||
n = null;
|
||||
}
|
||||
n = n == null ? func.length : (+n || 0);
|
||||
n = (func && n == null) ? func.length : nativeMax(+n || 0, 0);
|
||||
return createWrapper(func, ARY_FLAG, null, null, null, null, n);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user