From 7610f1d9cfc64f2841faf3f74db6976dc0c190bc Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 14 Aug 2019 17:04:45 +0200 Subject: [PATCH] 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 --- modules/luci-base/htdocs/luci-static/resources/firewall.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(), -- 2.25.1