Skip to content
Snippets Groups Projects
Commit 2073d523 authored by Tom Robinson's avatar Tom Robinson
Browse files

Fix scalar settings that are strings

parent 02c91f2d
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,10 @@ function scalarSettingsToFormatOptions(settings) {
maximumFractionDigits: parseFloat(settings["scalar.decimals"]),
};
// remove null options to allow for defaults
return _.pick(formatOptions, v => v != null && v !== "" && !isNaN(v));
return _.pick(
formatOptions,
v => v != null && v !== "" && (typeof v !== "number" || !isNaN(v)),
);
}
export default class Scalar extends Component {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment