From 63e5d38db02fa18dd471e974d1410a454e0aa086 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 7 Nov 2023 21:59:25 +0100 Subject: luci-app-opkg: fix sorting by size column Fixes: #6120 Signed-off-by: Jo-Philipp Wich --- applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'applications/luci-app-opkg/htdocs/luci-static') diff --git a/applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js b/applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js index d4d5b8b88b..af1e972efc 100644 --- a/applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js +++ b/applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js @@ -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 ]); -- cgit v1.2.3