luci-base: form.js: treat inactive options as optional
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
90c52a1782
commit
5cfad8d65b
1 changed files with 1 additions and 1 deletions
|
@ -834,7 +834,7 @@ var CBIAbstractValue = CBINode.extend({
|
||||||
return Promise.resolve(this.write(section_id, fval));
|
return Promise.resolve(this.write(section_id, fval));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (this.rmempty || this.optional) {
|
if (!active || this.rmempty || this.optional) {
|
||||||
return Promise.resolve(this.remove(section_id));
|
return Promise.resolve(this.remove(section_id));
|
||||||
}
|
}
|
||||||
else if (!isEqual(cval, fval)) {
|
else if (!isEqual(cval, fval)) {
|
||||||
|
|
Loading…
Reference in a new issue