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:07:32 +0000 (00:07 +0100)
commit3c166c25de535c5c5aeda1d40eba6c1756c412be
tree9dd5ed3cdcc2356f63467f9afd357a15fa405d43
parent99e9c10612b1146b7125cf92bd4e1613b9ec8212
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>
modules/luci-base/htdocs/luci-static/resources/luci.js