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 <jo@mein.io>
(cherry picked from commit
2d2e5c0689b3483b22d033af1da9d33afeedf33e)
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
]);