From 7e30a5e11e35a9f1f6de68842b3a3f20faf59c17 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 26 Sep 2022 10:46:00 +0200 Subject: 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 --- modules/luci-base/root/usr/share/rpcd/ucode/luci | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/luci-base') 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) }; } -- cgit v1.2.3