Skip to content

Commit

Permalink
[bugfix] fix bar order
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Jul 26, 2017
1 parent 49ab091 commit b12ddee
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions superset/assets/javascripts/modules/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit b12ddee

Please sign in to comment.