Skip to content

Commit

Permalink
luci-app-opkg: populate alternative package size if needed
Browse files Browse the repository at this point in the history
Populate the raw size value with the alternative size if the package
size is unavailable.

Fixes: openwrt#7139
Fixes: 63e5d38 ("luci-app-opkg: fix sorting by size column")
Signed-off-by: Jo-Philipp Wich <[email protected]>
  • Loading branch information
jow- committed May 27, 2024
1 parent fcc4cc9 commit 2d2e5c0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
]);
Expand Down

0 comments on commit 2d2e5c0

Please sign in to comment.