luci-mod-network: fix saving bridge VLANs without member ports
[project/luci.git] / modules / luci-mod-network / htdocs / luci-static / resources / tools / network.js
index d13299777f5801043a3593c07f9283fe96144f4f..6248f7bf77ce6c2356b31659a04a0b70733956b9 100644 (file)
@@ -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() {}