Closed Xotic750 closed 7 years ago
https://github.com/ljharb/es-abstract/blob/master/es2015.js#L67
var value = isPrimitive(argument) ? argument : toPrimitive(argument, 'number');
seems that it should be
var value = isPrimitive(argument) ? argument : toPrimitive(argument, Number);
As according to es-to-primitive, the PreferredType should be String or Number if supplied. https://github.com/ljharb/es-to-primitive/blob/master/es6.js#L48
String
Number
Thanks, good catch.
https://github.com/ljharb/es-abstract/blob/master/es2015.js#L67
var value = isPrimitive(argument) ? argument : toPrimitive(argument, 'number');
seems that it should be
var value = isPrimitive(argument) ? argument : toPrimitive(argument, Number);
As according to es-to-primitive, the PreferredType should be
String
orNumber
if supplied. https://github.com/ljharb/es-to-primitive/blob/master/es6.js#L48