More lodash cleanup.

This commit is contained in:
John-David Dalton
2014-06-20 08:04:56 -07:00
parent c36d29a896
commit fe5aff0c72

View File

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