luci-base: network.js: fix deleteNetwork() implementation

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2019-09-24 08:02:57 +02:00
parent 186ddfa044
commit 809f16d4ce

View file

@ -822,7 +822,9 @@ Network = L.Class.extend({
}, },
deleteNetwork: function(name) { deleteNetwork: function(name) {
return Promise.all([ L.require('firewall').catch(function() { return null }), initNetworkState() ]).then(function() { var requireFirewall = Promise.resolve(L.require('firewall')).catch(function() {});
return Promise.all([ requireFirewall, initNetworkState() ]).then(function() {
var uciInterface = uci.get('network', name); var uciInterface = uci.get('network', name);
if (uciInterface != null && uciInterface['.type'] == 'interface') { if (uciInterface != null && uciInterface['.type'] == 'interface') {