luci-base: network.js: fix deleteNetwork() implementation
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
186ddfa044
commit
809f16d4ce
1 changed files with 3 additions and 1 deletions
|
@ -822,7 +822,9 @@ Network = L.Class.extend({
|
|||
},
|
||||
|
||||
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);
|
||||
|
||||
if (uciInterface != null && uciInterface['.type'] == 'interface') {
|
||||
|
|
Loading…
Reference in a new issue