From 2891ca4cda356023ef857749ba2514baaa861d94 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 27 May 2024 14:09:53 +0200 Subject: [PATCH] luci-app-opkg: populate alternative package size if needed Populate the raw size value with the alternative size if the package size is unavailable. Fixes: #7139 Fixes: 63e5d38db0 ("luci-app-opkg: fix sorting by size column") Signed-off-by: Jo-Philipp Wich (cherry picked from commit 2d2e5c0689b3483b22d033af1da9d33afeedf33e) --- .../luci-app-opkg/htdocs/luci-static/resources/view/opkg.js | 6 +++--- 1 file changed, 3 insertions(+), 3 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 d7a13d80d1..5d9a7496b1 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,9 +310,9 @@ function display(pattern) currentDisplayRows.push([ name, ver, - [ pkg.size || 0, - pkg.size ? '%1024mB'.format(pkg.size) - : (altsize ? '~%1024mB'.format(altsize) : '-') ], + [ pkg.size || altsize || 0, + pkg.size ? '%1024mB'.format(pkg.size) + : (altsize ? '~%1024mB'.format(altsize) : '-') ], desc, btn ]); -- 2.30.2