summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-07-09 11:09:57 +0200
committerJo-Philipp Wich <jo@mein.io>2018-07-09 11:51:43 +0200
commit6cda8e6dabd6e3dbc93882a2a6f99662b75b7786 (patch)
tree8797d08f3bc8130f8f7359fbb9178d46032cdcc1
parent690f3f13acd465fdb5d5e774846e19e5c633b08e (diff)
luci-base: cbi.js: avoid setting empty cell title attributes
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/cbi.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/cbi.js b/modules/luci-base/htdocs/luci-static/resources/cbi.js
index 74b275742c..ddbff83418 100644
--- a/modules/luci-base/htdocs/luci-static/resources/cbi.js
+++ b/modules/luci-base/htdocs/luci-static/resources/cbi.js
@@ -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');