Commit b3e6da0c by Ryan McKinley Committed by Marcus Efraimsson

check for null with toLocalString (#14208)

parent 2faf8c72
......@@ -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 });
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment