luci-app-opkg: gracefully handle empty config files
Fixes: #3668 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
4efc7cbbda
commit
562425605a
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