Browse Source

luci-app-opkg: fix parsing empty package repository indexes

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Jo-Philipp Wich 3 years ago
parent
commit
3bcbcbf088

+ 1 - 1
applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js

@@ -181,7 +181,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 ];