luci-base: don't fail getInitList if no indexes can be determined

Gracefully handle missing indexes in the luci rpcd plugin getInitList
procedure.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2022-09-26 10:46:00 +02:00
parent 008fa18878
commit 7e30a5e11e

View file

@ -26,8 +26,8 @@ const methods = {
let idx = init_index(name); let idx = init_index(name);
scripts[name] = { scripts[name] = {
index: idx[0], index: idx?.[0],
stop: idx[1], stop: idx?.[1],
enabled: init_enabled(name) enabled: init_enabled(name)
}; };
} }