Use isSymbol instead of baseToNumber to fix _.toNumber test fails.

This commit is contained in:
John-David Dalton
2016-04-16 20:45:10 -07:00
parent db49702046
commit 762e858c48

View File

@@ -11605,9 +11605,8 @@
if (typeof value == 'number') {
return value;
}
var result = baseToNumber(value);
if (result !== result) {
return result;
if (isSymbol(value)) {
return NAN;
}
if (isObject(value)) {
var other = isFunction(value.valueOf) ? value.valueOf() : value;