From 2073d523992494a96aeca91b37ef7ac40815b492 Mon Sep 17 00:00:00 2001 From: Tom Robinson <tlrobinson@gmail.com> Date: Tue, 11 Sep 2018 14:16:13 -0700 Subject: [PATCH] Fix scalar settings that are strings --- .../src/metabase/visualizations/visualizations/Scalar.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/metabase/visualizations/visualizations/Scalar.jsx b/frontend/src/metabase/visualizations/visualizations/Scalar.jsx index fe6184e589f..100a8075f6d 100644 --- a/frontend/src/metabase/visualizations/visualizations/Scalar.jsx +++ b/frontend/src/metabase/visualizations/visualizations/Scalar.jsx @@ -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 { -- GitLab