mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 01:47:48 +00:00
Move lodash instance check up in lodash function and tweak chaining benchmark.
Former-commit-id: 799ae05e5180ee87bb2a5249be3e442ed0425ef7
This commit is contained in:
6
dist/lodash.underscore.js
vendored
6
dist/lodash.underscore.js
vendored
@@ -196,12 +196,12 @@
|
||||
* @returns {Object} Returns a `lodash` instance.
|
||||
*/
|
||||
function lodash(value) {
|
||||
if (value instanceof lodash) {
|
||||
return value;
|
||||
}
|
||||
if (!(this instanceof lodash)) {
|
||||
return new lodash(value);
|
||||
}
|
||||
if (value instanceof lodash) {
|
||||
return value;
|
||||
}
|
||||
this.__wrapped__ = value;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user