FormattedValueDisplay: Improve styles check (#95639)
This commit is contained in:
@@ -23,7 +23,7 @@ export const FormattedValueDisplay = ({ value, className, style, ...htmlProps }:
|
||||
const hasSuffix = (value.suffix ?? '').length > 0;
|
||||
let suffixStyle;
|
||||
|
||||
if (style && style.fontSize && typeof style.fontSize === 'number') {
|
||||
if (style && typeof style.fontSize === 'number' && !Number.isNaN(style.fontSize)) {
|
||||
const fontSize = style.fontSize;
|
||||
const reductionFactor = fontSizeReductionFactor(fontSize);
|
||||
suffixStyle = { fontSize: fontSize * reductionFactor };
|
||||
|
||||
Reference in New Issue
Block a user