summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2022-09-26 10:46:00 +0200
committerJo-Philipp Wich <jo@mein.io>2022-10-25 01:03:37 +0200
commit7e30a5e11e35a9f1f6de68842b3a3f20faf59c17 (patch)
treeb8af53157e97f67d92bb8dafaf4a1f0030db7658 /modules/luci-base
parent008fa188780a8670cfa8d204eaf946ce1fb5954a (diff)
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>
Diffstat (limited to 'modules/luci-base')
-rw-r--r--modules/luci-base/root/usr/share/rpcd/ucode/luci4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/luci-base/root/usr/share/rpcd/ucode/luci b/modules/luci-base/root/usr/share/rpcd/ucode/luci
index 794676abc6..cb00ff86d4 100644
--- a/modules/luci-base/root/usr/share/rpcd/ucode/luci
+++ b/modules/luci-base/root/usr/share/rpcd/ucode/luci
@@ -26,8 +26,8 @@ const methods = {
let idx = init_index(name);
scripts[name] = {
- index: idx[0],
- stop: idx[1],
+ index: idx?.[0],
+ stop: idx?.[1],
enabled: init_enabled(name)
};
}