From: Jo-Philipp Wich Date: Tue, 23 Nov 2021 18:11:34 +0000 (+0100) Subject: luci-base: cbi.js: properly handle falsy values in cbi_update_table() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=ab3595b12a272937ed6bdfb86f7cf30411314a7c;p=project%2Fluci.git luci-base: cbi.js: properly handle falsy values in cbi_update_table() Fixes: #5544 Signed-off-by: Jo-Philipp Wich (cherry picked from commit e982c05671229b3d13622b38c9536812e8c5f05c) --- diff --git a/modules/luci-base/htdocs/luci-static/resources/cbi.js b/modules/luci-base/htdocs/luci-static/resources/cbi.js index 92c41515fb..9dbbe6bdc1 100644 --- a/modules/luci-base/htdocs/luci-static/resources/cbi.js +++ b/modules/luci-base/htdocs/luci-static/resources/cbi.js @@ -762,7 +762,7 @@ function cbi_update_table(table, data, placeholder) { var td = trow.appendChild(E('div', { 'class': titles[i].className, 'data-title': (text !== '') ? text : null - }, row[i] || '')); + }, (row[i] != null) ? row[i] : '')); td.classList.remove('th'); td.classList.add('td');