luci-base: firewall.js: fix Firewall.removeZone()
authorJo-Philipp Wich <jo@mein.io>
Thu, 26 Mar 2020 18:12:38 +0000 (19:12 +0100)
committerJo-Philipp Wich <jo@mein.io>
Thu, 26 Mar 2020 18:12:38 +0000 (19:12 +0100)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/firewall.js

index eaab3bb9f0f19ca97930229234227998aeb74a08..4a15312407e758ee27c3504ca5e9831c44decf91 100644 (file)
@@ -154,8 +154,8 @@ Firewall = L.Class.extend({
 
                        if (section != null && section['.type'] == 'zone') {
                                found = true;
-                               name = zone.name;
-                               uci.remove('firewall', zone['.name']);
+                               name = section.name;
+                               uci.remove('firewall', section['.name']);
                        }
                        else if (name != null) {
                                var sections = uci.sections('firewall', 'zone');