summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/htdocs/luci-static/resources/form.js
diff options
context:
space:
mode:
Diffstat (limited to 'modules/luci-base/htdocs/luci-static/resources/form.js')
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/form.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/form.js b/modules/luci-base/htdocs/luci-static/resources/form.js
index 53ea3c5bcd..7cf2ae7597 100644
--- a/modules/luci-base/htdocs/luci-static/resources/form.js
+++ b/modules/luci-base/htdocs/luci-static/resources/form.js
@@ -3068,8 +3068,10 @@ var CBITableSection = CBITypedSection.extend(/** @lends LuCI.form.TableSection.p
n.classList.remove('flash')
});
+ val = Array.isArray(val) ? val.join(' '): val;
+ val = `${val}`; // coerce non-string types to string
list.push([
- ui.Table.prototype.deriveSortKey((val != null) ? val.trim() : ''),
+ ui.Table.prototype.deriveSortKey((val != null && typeof val.trim === 'function') ? val.trim() : ''),
tr
]);
}, this));