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:
Jo-Philipp Wich 2019-08-14 17:04:45 +02:00
parent 167ad7bb12
commit 7610f1d9cf

View file

@ -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(),