diff options
author | Jo-Philipp Wich <jo@mein.io> | 2020-02-23 21:16:23 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2020-02-23 21:16:23 +0100 |
commit | 562425605af51443986cb2596199564e4102ffff (patch) | |
tree | 78a61316fc179cdc4f846573f3451e2dc33099ca /applications/luci-app-opkg | |
parent | 4efc7cbbda86280343683a7d1c2563233c499550 (diff) |
luci-app-opkg: gracefully handle empty config files
Fixes: #3668
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'applications/luci-app-opkg')
-rw-r--r-- | applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js | 2 |
1 files changed, 1 insertions, 1 deletions
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 5442e794b..c7cb55fc4 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 @@ -662,7 +662,7 @@ function handleConfig(ev) body.push(E('h5', {}, '%h'.format(file))); body.push(E('textarea', { 'name': file, - 'rows': Math.max(Math.min(conf[file].match(/\n/g).length, 10), 3) + 'rows': Math.max(Math.min(L.toArray(conf[file].match(/\n/g)).length, 10), 3) }, '%h'.format(conf[file]))); }); |