From: Jo-Philipp Wich Date: Wed, 14 Aug 2019 15:04:45 +0000 (+0200) Subject: luci-base: firewall.js: fix addZone() X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7610f1d9cfc64f2841faf3f74db6976dc0c190bc;p=oweals%2Fluci.git luci-base: firewall.js: fix addZone() When checking for an existing zone with the same name internally, addZone() must use the nonblocking lookupZone() instead of the promise returning public getZone() call. Signed-off-by: Jo-Philipp Wich --- diff --git a/modules/luci-base/htdocs/luci-static/resources/firewall.js b/modules/luci-base/htdocs/luci-static/resources/firewall.js index 9ae14e16d..8f6be1813 100644 --- a/modules/luci-base/htdocs/luci-static/resources/firewall.js +++ b/modules/luci-base/htdocs/luci-static/resources/firewall.js @@ -99,7 +99,7 @@ Firewall = L.Class.extend({ if (name == null || !/^[a-zA-Z0-9_]+$/.test(name)) return null; - if (this.getZone(name) != null) + if (lookupZone(name) != null) return null; var d = new Defaults(),