luci-app-opkg: gracefully handle empty config files
Fixes: #3668
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 562425605a
)
This commit is contained in:
parent
02c68f2838
commit
98ca75e918
1 changed files with 1 additions and 1 deletions
|
@ -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])));
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue