diff options
author | Jo-Philipp Wich <jo@mein.io> | 2019-09-24 08:02:57 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2019-09-24 08:02:57 +0200 |
commit | 809f16d4ceab8a14a790ce1a1abbc2ce26c2b9f8 (patch) | |
tree | 6bf2faf036ce1cbd68637a0b1b3c0408c2fa6bd4 /modules | |
parent | 186ddfa0446c3a1023919bca7a33c6dc0d63f765 (diff) |
luci-base: network.js: fix deleteNetwork() implementation
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/network.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/network.js b/modules/luci-base/htdocs/luci-static/resources/network.js index 8432bd16f..a85e2414b 100644 --- a/modules/luci-base/htdocs/luci-static/resources/network.js +++ b/modules/luci-base/htdocs/luci-static/resources/network.js @@ -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') { |