luci-app-attendedsysupgrade: fix empty array condition
authorPaul Spooren <mail@aparcar.org>
Sun, 25 Jul 2021 22:36:19 +0000 (00:36 +0200)
committerPaul Spooren <mail@aparcar.org>
Thu, 26 Aug 2021 07:52:00 +0000 (21:52 -1000)
commit505b671c210de07977321067c49a89570a33ebfa
treee8fe8680ad17cdf60e1aa249c834d945215d373e
parentb41f37739e28210f0997fd1bb8d98cfee93cfa6d
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>
applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade/overview.js