diff options
author | Jo-Philipp Wich <jo@mein.io> | 2017-09-07 15:29:45 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2017-10-17 17:35:01 +0200 |
commit | 98aacba3ac4b307e8bd2000175cfd66a3b8162c3 (patch) | |
tree | d27b1b6560553d865a0cf6cff9d50f86592e1e30 /modules/luci-base/luasrc/view | |
parent | 462779c38419039880aca5583fa30b274aba6ba6 (diff) |
luci-base: gracefully handle broken firewall forwarding sections
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/luasrc/view')
-rw-r--r-- | modules/luci-base/luasrc/view/cbi/firewall_zoneforwards.htm | 5 |
1 files changed, 3 insertions, 2 deletions
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 %> <label class="zonebadge" style="background-color:<%=fz:get_color()%>"> <strong><%=fz:name()%></strong> </label>  - <% end %> + <% end end %> <% if empty then %> <label class="zonebadge zonebadge-empty"> <strong><%=zone:forward():upper()%></strong> |