Skip to content

Commit

Permalink
Fix bad d3.format metric setting and/or value === Infinity
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Mar 14, 2017
1 parent 562b4f0 commit bf57bc6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion superset/assets/javascripts/modules/utils.js
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 bf57bc6

Please sign in to comment.