Skip to content

Commit 08bdcd5

Browse files
authoredMar 14, 2017
Fix bad d3.format metric setting and/or value === Infinity (apache#2399)
1 parent 0b8522b commit 08bdcd5

File tree

1 file changed

+5
-1
lines changed
  • superset/assets/javascripts/modules

1 file changed

+5
-1
lines changed
 

‎superset/assets/javascripts/modules/utils.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,11 @@ export function d3format(format, number) {
109109
if (!(format in formatters)) {
110110
formatters[format] = d3.format(format);
111111
}
112-
return formatters[format](number);
112+
try {
113+
return formatters[format](number);
114+
} catch (e) {
115+
return 'ERR';
116+
}
113117
}
114118

115119
// Slice objects interact with their context through objects that implement

0 commit comments

Comments
 (0)
Please sign in to comment.