From 809f16d4ceab8a14a790ce1a1abbc2ce26c2b9f8 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 24 Sep 2019 08:02:57 +0200 Subject: [PATCH] luci-base: network.js: fix deleteNetwork() implementation Signed-off-by: Jo-Philipp Wich --- modules/luci-base/htdocs/luci-static/resources/network.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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') { -- 2.25.1