luci-base: cbi.js: properly handle falsy values in cbi_update_table()

Fixes: #5544
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit e982c05671)
This commit is contained in:
Jo-Philipp Wich 2021-11-23 19:11:34 +01:00
parent 8bd4e78ff2
commit ab3595b12a

View file

@ -762,7 +762,7 @@ function cbi_update_table(table, data, placeholder) {
var td = trow.appendChild(E('div', { var td = trow.appendChild(E('div', {
'class': titles[i].className, 'class': titles[i].className,
'data-title': (text !== '') ? text : null 'data-title': (text !== '') ? text : null
}, row[i] || '')); }, (row[i] != null) ? row[i] : ''));
td.classList.remove('th'); td.classList.remove('th');
td.classList.add('td'); td.classList.add('td');