Add _.transform unit tests.

Former-commit-id: 34e844950f5c003eeeaf2daea7a5ef6247fbfdab
This commit is contained in:
John-David Dalton
2013-05-19 10:57:50 -07:00
parent 90cca8a3eb
commit 10626904af
2 changed files with 71 additions and 10 deletions

View File

@@ -2332,7 +2332,7 @@
var isArr = isArray(object);
callback = lodash.createCallback(callback, thisArg, 4);
if (arguments.length < 3) {
if (accumulator == null) {
if (isArr) {
accumulator = [];
} else {