File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -956,10 +956,10 @@ export function ToSecondsStringPrecision(options: Temporal.ToStringPrecisionOpti
956
956
if ( stringDigits === 'auto' ) return { precision : 'auto' , unit : 'nanosecond' , increment : 1 } ;
957
957
throw new RangeError ( `fractionalSecondDigits must be 'auto' or 0 through 9, not ${ stringDigits } ` ) ;
958
958
}
959
- if ( NumberIsNaN ( digits ) || digits < 0 || digits > 9 ) {
959
+ const precision = ToInteger ( digits ) ;
960
+ if ( ! NumberIsFinite ( digits ) || precision < 0 || precision > 9 ) {
960
961
throw new RangeError ( `fractionalSecondDigits must be 'auto' or 0 through 9, not ${ digits } ` ) ;
961
962
}
962
- const precision = MathFloor ( digits ) ;
963
963
switch ( precision ) {
964
964
case 0 :
965
965
return { precision, unit : 'second' , increment : 1 } ;
You can’t perform that action at this time.
0 commit comments