Skip to content

Commit 1b39988

Browse files
gibson04212wrigja
authored andcommitted
Apply suggestions from code review
Co-authored-by: Ms2ger <[email protected]> UPSTREAM_COMMIT=273cb2e9be0eba9e7b786b2392d1b4067fbaaf33
1 parent 55a3fcd commit 1b39988

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/ecmascript.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -956,8 +956,8 @@ export function ToSecondsStringPrecision(options: Temporal.ToStringPrecisionOpti
956956
if (stringDigits === 'auto') return { precision: 'auto', unit: 'nanosecond', increment: 1 };
957957
throw new RangeError(`fractionalSecondDigits must be 'auto' or 0 through 9, not ${stringDigits}`);
958958
}
959-
const precision = ToInteger(digits);
960-
if (!NumberIsFinite(digits) || precision < 0 || precision > 9) {
959+
const precision = MathTrunc(digits);
960+
if (!NumberIsFinite(precision) || precision < 0 || precision > 9) {
961961
throw new RangeError(`fractionalSecondDigits must be 'auto' or 0 through 9, not ${digits}`);
962962
}
963963
switch (precision) {

0 commit comments

Comments
 (0)