luci-base: cbi.js: avoid setting empty cell title attributes

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2018-07-09 11:09:57 +02:00
parent 690f3f13ac
commit 6cda8e6dab

View file

@ -2081,10 +2081,10 @@ function cbi_update_table(table, data, placeholder) {
var trow = E('div', { 'class': 'tr' });
for (var i = 0; i < titles.length; i++) {
var text = titles[i].innerText;
var text = (titles[i].innerText || '').trim();
var td = trow.appendChild(E('div', {
'class': titles[i].className,
'data-title': text ? text.trim() : null
'data-title': (text !== '') ? text : null
}, row[i] || ''));
td.classList.remove('th');