From 98aacba3ac4b307e8bd2000175cfd66a3b8162c3 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 7 Sep 2017 15:29:45 +0200 Subject: luci-base: gracefully handle broken firewall forwarding sections Signed-off-by: Jo-Philipp Wich --- modules/luci-base/luasrc/view/cbi/firewall_zoneforwards.htm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules/luci-base/luasrc/view') diff --git a/modules/luci-base/luasrc/view/cbi/firewall_zoneforwards.htm b/modules/luci-base/luasrc/view/cbi/firewall_zoneforwards.htm index 2a433b5696..546fd8e85a 100644 --- a/modules/luci-base/luasrc/view/cbi/firewall_zoneforwards.htm +++ b/modules/luci-base/luasrc/view/cbi/firewall_zoneforwards.htm @@ -43,11 +43,12 @@  ⇒  <% for _, fwd in ipairs(zone:get_forwardings_by("src")) do fz = fwd:dest_zone() - empty = false %> + if fz then + empty = false %>   - <% end %> + <% end end %> <% if empty then %>