summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-network/htdocs
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2021-07-02 20:47:11 +0200
committerJo-Philipp Wich <jo@mein.io>2021-07-02 20:47:11 +0200
commitf1f566bfe2a6b0960ba95a5ea05ca4353b766867 (patch)
tree1e807351072c5b23afd884c50e7b661ef517c70f /modules/luci-mod-network/htdocs
parent2869c9cf324a9e057567075d4977c7cc40140938 (diff)
luci-mod-network: fix saving bridge VLANs without member ports
Calling `uci.set()` with an empty array yields an invalid argument error, make sure to pass `null` instead in this case. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-mod-network/htdocs')
-rw-r--r--modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js2
1 files changed, 1 insertions, 1 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 d13299777f..6248f7bf77 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
@@ -304,7 +304,7 @@ var cbiTagValue = form.Value.extend({
}
}
- uci.set('network', section_id, 'ports', ports);
+ uci.set('network', section_id, 'ports', ports.length ? ports : null);
},
remove: function() {}