summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-network
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2021-03-29 16:27:47 +0200
committerJo-Philipp Wich <jo@mein.io>2021-03-29 16:27:47 +0200
commitb9fad85f2e3fc988528fd326db715719288604ea (patch)
tree21fec303724a8778ad006868e54d59f8a3723f5b /modules/luci-mod-network
parenta9a223b973c7f5f057d19a7fc09e7364087fec79 (diff)
luci-mod-network: fix unsetting network.device options
The existing logic only handled removing the last remaining device section option (which results in the deletion of the entire section) but failed to actually unset single options. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-mod-network')
-rw-r--r--modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js b/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js
index 829ab14963..cd51a0391c 100644
--- a/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js
+++ b/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js
@@ -158,6 +158,8 @@ function deviceRemove(section_id) {
if (empty)
uci.remove('network', ds);
+ else
+ uci.unset('network', ds, this.option);
}
uci.unset('network', section_id, this.option);