mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 15:27:50 +00:00
Bump to v4.11.2.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
define([], function() {
|
||||
define(['./_baseToNumber', './_baseToString'], function(baseToNumber, baseToString) {
|
||||
|
||||
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
|
||||
var undefined;
|
||||
@@ -20,7 +20,17 @@ define([], function() {
|
||||
result = value;
|
||||
}
|
||||
if (other !== undefined) {
|
||||
result = result === undefined ? other : operator(result, other);
|
||||
if (result === undefined) {
|
||||
return other;
|
||||
}
|
||||
if (typeof value == 'string' || typeof other == 'string') {
|
||||
value = baseToString(value);
|
||||
other = baseToString(other);
|
||||
} else {
|
||||
value = baseToNumber(value);
|
||||
other = baseToNumber(other);
|
||||
}
|
||||
result = operator(value, other);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user