luci-app-opkg: fix sorting by size column

Fixes: #6120
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2023-11-07 21:59:25 +01:00
parent e8029b0828
commit 63e5d38db0

View file

@ -310,8 +310,9 @@ function display(pattern)
currentDisplayRows.push([
name,
ver,
pkg.size ? '%1024mB'.format(pkg.size)
: (altsize ? '~%1024mB'.format(altsize) : '-'),
[ pkg.size || 0,
pkg.size ? '%1024mB'.format(pkg.size)
: (altsize ? '~%1024mB'.format(altsize) : '-') ],
desc,
btn
]);