luci-base: luci.js: fix sortedKeys() ordering
authorJo-Philipp Wich <jo@mein.io>
Tue, 9 Feb 2021 23:02:59 +0000 (00:02 +0100)
committerJo-Philipp Wich <jo@mein.io>
Tue, 9 Feb 2021 23:08:27 +0000 (00:08 +0100)
commit1f74e2133652aaee6f6e5c87263675f8fc00d9a3
tree5ac014c2666e70ed8da244a961f78a35c535de60
parent2936a191f56c795a246cf76730e67161bcbdb9b3
luci-base: luci.js: fix sortedKeys() ordering

Chrome does not properly sort arrays when the sort function returns boolean
results, in contrast to Firefox which does.

Fix the issue by returning a numerical result instead.

Fixes: #4792
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 3c166c25de535c5c5aeda1d40eba6c1756c412be)
modules/luci-base/htdocs/luci-static/resources/luci.js