mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
check for null with toLocalString (#14208)
This commit is contained in:
parent
2faf8c722f
commit
b3e6da0cbd
@ -428,10 +428,16 @@ kbn.valueFormats.hex0x = (value, decimals) => {
|
||||
};
|
||||
|
||||
kbn.valueFormats.sci = (value, decimals) => {
|
||||
if (value == null) {
|
||||
return '';
|
||||
}
|
||||
return value.toExponential(decimals);
|
||||
};
|
||||
|
||||
kbn.valueFormats.locale = (value, decimals) => {
|
||||
if (value == null) {
|
||||
return '';
|
||||
}
|
||||
return value.toLocaleString(undefined, { maximumFractionDigits: decimals });
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user