Move isArray check higher up in lodash function.

This commit is contained in:
John-David Dalton
2014-11-09 22:43:50 -08:00
parent 65e30c13e2
commit ad56bdd354

View File

@@ -1058,11 +1058,11 @@
* // => true * // => true
*/ */
function lodash(value) { function lodash(value) {
if (value && typeof value == 'object') { if (value && typeof value == 'object' && !isArray(value)) {
if (value instanceof LodashWrapper) { if (value instanceof LodashWrapper) {
return value; return value;
} }
if (!isArray(value) && hasOwnProperty.call(value, '__wrapped__')) { if (hasOwnProperty.call(value, '__wrapped__')) {
return new LodashWrapper(value.__wrapped__, value.__chain__, baseSlice(value.__queue__)); return new LodashWrapper(value.__wrapped__, value.__chain__, baseSlice(value.__queue__));
} }
} }