luci-base: fix uci write bug when input value equals default
authorAndy Chiang <redacted>
Tue, 19 May 2026 16:29:07 +0000 (23:29 +0700)
committerPaul Donald <redacted>
Wed, 27 May 2026 11:32:38 +0000 (14:32 +0300)
commit974b5864e05ef30f38149389f15583c08bdd4eda
treedef0821f9a1d2a03e73539b22533c252659a66bb
parent54338546bca800dad20248534c2a8733f70c1c26
luci-base: fix uci write bug when input value equals default

Avoid executing unnecessary write operations to flash/UCI when the
user's form selection or input exactly matches the component's
`default` configuration.

Previously, if a field had a valid value identical to its default,
it would bypass the empty check and trigger a `write()` call, leading
to configuration bloating. This change ensures that such values are
correctly intercepted and handled via `this.remove()` to keep the
underlying configuration file clean and precise.

Signed-off-by: Andy Chiang <redacted>
modules/luci-base/htdocs/luci-static/resources/form.js
git clone https://git.99rst.org/PROJECT