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>
This commit is contained in:
Jo-Philipp Wich 2021-07-02 20:47:11 +02:00
parent 2869c9cf32
commit f1f566bfe2

View 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() {}