luci-mod-network: fix potential null dereference on deleting VLANs

Fixes: #7074
Fixes: 61cef9baad ("luci-mod-network: don't trigger uci save on removing bridge vlans")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich
2024-04-20 23:13:12 +02:00
parent 0c92d30d6f
commit ea04003657

View File

@@ -921,7 +921,7 @@ return baseclass.extend({
ss.handleRemove = function(section_id) {
this.map.data.remove('network', section_id);
s.map.addedVLANs = s.map.addedVLANs.filter(function(sid) {
s.map.addedVLANs = (s.map.addedVLANs || []).filter(function(sid) {
return sid != section_id;
});