luci-app-attendedsysupgrade: fix empty array condition
In JavaScript (other than in Python) an empty array is considered `true`
within if statements. Fix this by checking for the array length rather
than its existence.
This fixes the issue of an empty dropdown menu in case the user is
running the latest release.
Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit 7f5becc69e
)
This commit is contained in:
parent
f543a84c5b
commit
132c72c7b7
1 changed files with 1 additions and 1 deletions
|
@ -255,7 +255,7 @@ function check_sysupgrade(server_url, current_version, target, board_name, packa
|
|||
}
|
||||
}
|
||||
}
|
||||
if (candidates) {
|
||||
if (candidates.length) {
|
||||
var m, s, o;
|
||||
|
||||
var mapdata = {
|
||||
|
|
Loading…
Reference in a new issue