Ensure that just created uci device sections are removed if the edit
option modal is cancelled without saving. This prevents empty, but
harmless `config device` sections from being created on a subsequent
Save & Apply operation.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit
c13ef9406c9c2e12c28d2065b342444af5e27c0b)
for (var i = 0; i < map.addedVLANs.length; i++)
uci.remove('network', map.addedVLANs[i]);
+ if (this.addedSection)
+ uci.remove('network', this.addedSection);
+
return form.GridSection.prototype.handleModalCancel.apply(this, arguments);
};