mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
Fix bad d3.format metric setting and/or value === Infinity (#2399)
This commit is contained in:
parent
0b8522be50
commit
08bdcd52b8
@ -109,7 +109,11 @@ export function d3format(format, number) {
|
||||
if (!(format in formatters)) {
|
||||
formatters[format] = d3.format(format);
|
||||
}
|
||||
return formatters[format](number);
|
||||
try {
|
||||
return formatters[format](number);
|
||||
} catch (e) {
|
||||
return 'ERR';
|
||||
}
|
||||
}
|
||||
|
||||
// Slice objects interact with their context through objects that implement
|
||||
|
Loading…
Reference in New Issue
Block a user