mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 17:07:49 +00:00
Fix non-lazy methods not executed when used with lazy .first() or .last()
This commit is contained in:
12
test/test.js
12
test/test.js
@@ -2390,7 +2390,7 @@
|
||||
|
||||
strictEqual(callback('a'), true);
|
||||
|
||||
var fn = function () {},
|
||||
var fn = function() {},
|
||||
bound = fn.bind && fn.bind(object);
|
||||
|
||||
if (bound) {
|
||||
@@ -12702,6 +12702,16 @@
|
||||
skipTest(2);
|
||||
}
|
||||
});
|
||||
|
||||
test('should work when in a lazy chain sequence, before `.last`', 1, function() {
|
||||
if (!isNpm) {
|
||||
var actual = _([1, 2, 3]).map().xor([4]).last();
|
||||
strictEqual(actual, 4);
|
||||
}
|
||||
else {
|
||||
skipTest(2);
|
||||
}
|
||||
});
|
||||
}(1, 2, 3));
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user