[TASK] Hide stats title when table is empty
This commit is contained in:
parent
c24cf3cfb5
commit
779fa0a630
@ -178,6 +178,7 @@ define(['d3-interpolate', 'snabbdom', 'filters/genericnode', 'helper'],
|
|||||||
};
|
};
|
||||||
|
|
||||||
self.renderSingle = function renderSingle(el, heading, table) {
|
self.renderSingle = function renderSingle(el, heading, table) {
|
||||||
|
if (table.children.length > 0) {
|
||||||
var h2 = document.createElement('h2');
|
var h2 = document.createElement('h2');
|
||||||
h2.classList.add('proportion-header');
|
h2.classList.add('proportion-header');
|
||||||
h2.textContent = _.t(heading);
|
h2.textContent = _.t(heading);
|
||||||
@ -186,6 +187,7 @@ define(['d3-interpolate', 'snabbdom', 'filters/genericnode', 'helper'],
|
|||||||
};
|
};
|
||||||
el.appendChild(h2);
|
el.appendChild(h2);
|
||||||
el.appendChild(table.elm);
|
el.appendChild(table.elm);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
return self;
|
return self;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user