This is an automated email from the ASF dual-hosted git repository. maximebeauchemin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push: new fca982c [bugfix] fix bar order (#3180) fca982c is described below commit fca982c609571876a87ca3ccd8627dc4bc6c8726 Author: Maxime Beauchemin <maximebeauche...@gmail.com> AuthorDate: Wed Jul 26 09:22:03 2017 -0700 [bugfix] fix bar order (#3180) --- superset/assets/javascripts/modules/utils.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/superset/assets/javascripts/modules/utils.js b/superset/assets/javascripts/modules/utils.js index 7349dbb..61949c7 100644 --- a/superset/assets/javascripts/modules/utils.js +++ b/superset/assets/javascripts/modules/utils.js @@ -229,14 +229,10 @@ export function initJQueryAjax() { } export function tryNumify(s) { - // Attempts casting to float, returns string when failing - try { - const parsed = parseFloat(s); - if (parsed) { - return parsed; - } - } catch (e) { - // pass + // Attempts casting to Number, returns string when failing + const n = Number(s); + if (isNaN(n)) { + return s; } - return s; + return n; } -- To stop receiving notification emails like this one, please contact ['"comm...@superset.apache.org" <comm...@superset.apache.org>'].