luci-base: firewall.js: don't treat zone name as network fallback

Drop obsolete extra logic which treats the zone name as covered network
name in case the network list is unset. This behaviour applied to the
pre-fw3 uci firewall, but is not supported since fw3 anymore.

Ref: https://forum.openwrt.org/t/luci-zone-creation-bug/55921
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2020-03-02 10:08:32 +01:00
parent 1c547d36b5
commit 4052436d82

View file

@ -362,13 +362,13 @@ Zone = AbstractFirewallItem.extend({
if (newNetworks.length > 0)
this.set('network', newNetworks.join(' '));
else
this.set('network', ' ');
this.set('network', null);
return (newNetworks.length < oldNetworks.length);
},
getNetworks: function() {
return L.toArray(this.get('network') || this.get('name'));
return L.toArray(this.get('network'));
},
clearNetworks: function() {