From: Jo-Philipp Wich Date: Sat, 20 Mar 2021 16:15:48 +0000 (+0100) Subject: luci-app-opkg: fix parsing empty package repository indexes X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=41ab871af052bce376870ec2412e1ed44f6876d4;p=project%2Fluci.git luci-app-opkg: fix parsing empty package repository indexes Signed-off-by: Jo-Philipp Wich (cherry picked from commit 3bcbcbf0889142ca19b893f41318963b69de90ab) --- 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 8e33d56379..2fc6555813 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 @@ -86,7 +86,7 @@ function parseList(s, dest) key = RegExp.$1.toLowerCase(); val = RegExp.$2.trim(); } - else { + else if (pkg) { dest.pkgs[pkg.name] = pkg; var provides = dest.providers[pkg.name] ? [] : [ pkg.name ];