summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-opkg/htdocs
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2023-11-07 21:59:25 +0100
committerJo-Philipp Wich <jo@mein.io>2023-11-07 22:00:05 +0100
commit63e5d38db02fa18dd471e974d1410a454e0aa086 (patch)
treed566cb5e1b6828f1bcc1653badbb97be50cb9542 /applications/luci-app-opkg/htdocs
parente8029b08287c666a43d5ef25c7ea83ce7d606903 (diff)
luci-app-opkg: fix sorting by size column
Fixes: #6120 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'applications/luci-app-opkg/htdocs')
-rw-r--r--applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js5
1 files changed, 3 insertions, 2 deletions
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
]);