Skip to content

Commit e16aa4d

Browse files
Renegade334LFDanLu
andauthored
Internationalized/NumberParser: fix TS5.5 build errors (#6329)
Co-authored-by: Daniel Lu <[email protected]>
1 parent 5cacbdb commit e16aa4d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/@internationalized/number/src/NumberParser.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,9 @@ class NumberParserImpl {
164164
// extra step for rounding percents to what our formatter would output
165165
let options = {
166166
...this.options,
167-
style: 'decimal',
168-
minimumFractionDigits: Math.min(this.options.minimumFractionDigits + 2, 20),
169-
maximumFractionDigits: Math.min(this.options.maximumFractionDigits + 2, 20)
167+
style: 'decimal' as const,
168+
minimumFractionDigits: Math.min((this.options.minimumFractionDigits ?? 0) + 2, 20),
169+
maximumFractionDigits: Math.min((this.options.maximumFractionDigits ?? 0) + 2, 20)
170170
};
171171
return (new NumberParser(this.locale, options)).parse(new NumberFormatter(this.locale, options).format(newValue));
172172
}

0 commit comments

Comments
 (0)