Skip to content

Commit

Permalink
Fix bad d3.format metric setting and/or value === Infinity (#2399)
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch authored Mar 14, 2017
1 parent 0b8522b commit 08bdcd5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion superset/assets/javascripts/modules/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 08bdcd5

Please sign in to comment.