mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 02:47:50 +00:00
Ensure shortcut fusion works for _.at with no indexes specified.
This commit is contained in:
@@ -13895,8 +13895,11 @@
|
||||
|
||||
LazyWrapper.prototype.at = rest(function(paths) {
|
||||
paths = baseFlatten(paths);
|
||||
return (paths.length == 1 && isIndex(paths[0]))
|
||||
? this.slice(paths[0], +paths[0] + 1)
|
||||
var length = paths.length,
|
||||
start = length ? paths[0] : 0;
|
||||
|
||||
return (length < 2 && isIndex(start))
|
||||
? this.slice(start, length ? (+start + 1) : start)
|
||||
: new LazyWrapper(this);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user