summaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2019-09-24 08:02:57 +0200
committerJo-Philipp Wich <jo@mein.io>2019-09-24 08:02:57 +0200
commit809f16d4ceab8a14a790ce1a1abbc2ce26c2b9f8 (patch)
tree6bf2faf036ce1cbd68637a0b1b3c0408c2fa6bd4 /modules
parent186ddfa0446c3a1023919bca7a33c6dc0d63f765 (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.js4
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 8432bd16f3..a85e2414b6 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') {