Fix non-lazy methods not executed when used with lazy .first() or .last()

This commit is contained in:
Filip Zawada
2014-11-21 20:45:24 +01:00
parent 5f7dcc9b78
commit a1a6095295
2 changed files with 20 additions and 10 deletions

View File

@@ -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));
/*--------------------------------------------------------------------------*/