Skip to content

Commit

Permalink
Merge pull request apache#53 from michellethomas/cherry_pick_table_no…
Browse files Browse the repository at this point in the history
…_metric_fix

Fixing issue with table viz for table with no metrics (apache#5205)
  • Loading branch information
michellethomas authored Jun 15, 2018
2 parents 8887517 + f57530c commit 174ce1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion superset/assets/src/visualizations/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function tableVis(slice, payload) {
const data = payload.data;
const fd = slice.formData;

let metrics = fd.metrics.map(m => m.label || m);
let metrics = (fd.metrics || []).map(m => m.label || m);
// Add percent metrics
metrics = metrics.concat((fd.percent_metrics || []).map(m => '%' + m));
// Removing metrics (aggregates) that are strings
Expand Down

0 comments on commit 174ce1a

Please sign in to comment.