luci-base: form.js: treat inactive options as optional

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2019-10-07 19:44:22 +02:00
parent 90c52a1782
commit 5cfad8d65b

View file

@ -834,7 +834,7 @@ var CBIAbstractValue = CBINode.extend({
return Promise.resolve(this.write(section_id, fval));
}
else {
if (this.rmempty || this.optional) {
if (!active || this.rmempty || this.optional) {
return Promise.resolve(this.remove(section_id));
}
else if (!isEqual(cval, fval)) {