mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 10:57:49 +00:00
Move isArray check higher up in lodash function.
This commit is contained in:
@@ -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__));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user