mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 03:17:49 +00:00
Use isSymbol instead of baseToNumber to fix _.toNumber test fails.
This commit is contained in:
@@ -11605,9 +11605,8 @@
|
|||||||
if (typeof value == 'number') {
|
if (typeof value == 'number') {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
var result = baseToNumber(value);
|
if (isSymbol(value)) {
|
||||||
if (result !== result) {
|
return NAN;
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
if (isObject(value)) {
|
if (isObject(value)) {
|
||||||
var other = isFunction(value.valueOf) ? value.valueOf() : value;
|
var other = isFunction(value.valueOf) ? value.valueOf() : value;
|
||||||
|
|||||||
Reference in New Issue
Block a user