mirror of
https://github.com/apache/superset.git
synced 2026-04-25 11:04:48 +00:00
[bugfix] fix bar order (#3180)
This commit is contained in:
committed by
GitHub
parent
747bf80474
commit
fca982c609
@@ -229,14 +229,10 @@ export function initJQueryAjax() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function tryNumify(s) {
|
export function tryNumify(s) {
|
||||||
// Attempts casting to float, returns string when failing
|
// Attempts casting to Number, returns string when failing
|
||||||
try {
|
const n = Number(s);
|
||||||
const parsed = parseFloat(s);
|
if (isNaN(n)) {
|
||||||
if (parsed) {
|
return s;
|
||||||
return parsed;
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
// pass
|
|
||||||
}
|
}
|
||||||
return s;
|
return n;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user