git.99rst.org
/
openwrt-luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
7b2d7ba
)
luci-base: form: fix sort order bug triggered by integer types
author
Paul Donald
<redacted>
Mon, 25 Nov 2024 20:32:39 +0000
(21:32 +0100)
committer
Paul Donald
<redacted>
Mon, 25 Nov 2024 20:32:39 +0000
(21:32 +0100)
Signed-off-by: Paul Donald <redacted>
modules/luci-base/htdocs/luci-static/resources/form.js
patch
|
blob
|
history
diff --git
a/modules/luci-base/htdocs/luci-static/resources/form.js
b/modules/luci-base/htdocs/luci-static/resources/form.js
index 53ea3c5bcd9176a15f2a97c98897a7262d7c4a06..7cf2ae75971ca7cf7c56ae8101f9f8f20632537f 100644
(file)
--- 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));
git clone https://git.99rst.org/PROJECT