mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
[bugfix] fix bar order (#3180)
This commit is contained in:
parent
747bf80474
commit
fca982c609
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user