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 <jo@mein.io>
This commit is contained in:
parent
167ad7bb12
commit
7610f1d9cf
1 changed files with 1 additions and 1 deletions
|
@ -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(),
|
||||
|
|
Loading…
Reference in a new issue