Skip to content

Commit

Permalink
Editorial: Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Ms2ger <Ms2ger@gmail.com>
  • Loading branch information
2 people authored and ptomato committed Jul 28, 2022
1 parent c3c0ee1 commit 273cb2e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions polyfill/lib/ecmascript.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -769,8 +769,8 @@ export const ES = ObjectAssign({}, ES2020, {
if (digits === 'auto') return { precision: 'auto', unit: 'nanosecond', increment: 1 };
throw new RangeError(`fractionalSecondDigits must be 'auto' or 0 through 9, not ${digits}`);
}
const precision = ES.ToInteger(digits);
if (!NumberIsFinite(digits) || precision < 0 || precision > 9) {
const precision = MathTrunc(digits);
if (!NumberIsFinite(precision) || precision < 0 || precision > 9) {
throw new RangeError(`fractionalSecondDigits must be 'auto' or 0 through 9, not ${digits}`);
}
switch (precision) {
Expand Down
2 changes: 1 addition & 1 deletion spec/abstractops.html
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ <h1>ToSecondsStringPrecision ( _normalizedOptions_ )</h1>
[[Increment]]: 1
}.
1. If _fractionalDigitsVal_ is *NaN*, *+&infin;*<sub>𝔽</sub>, or *-&infin;*<sub>𝔽</sub>, throw a *RangeError* exception.
1. Let _fractionalDigitCount_ be ! ToIntegerOrInfinity(_fractionalDigitsVal_).
1. Let _fractionalDigitCount_ be RoundTowardsZero(ℝ(_fractionalDigitsVal_)).
1. If _fractionalDigitCount_ &lt; 0 or _fractionalDigitCount_ &gt; 9, throw a *RangeError* exception.
1. If _fractionalDigitCount_ is 0, then
1. Return the Record {
Expand Down

0 comments on commit 273cb2e

Please sign in to comment.