summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-02-13 23:34:59 +0100
committerJo-Philipp Wich <jow@openwrt.org>2015-02-13 23:34:59 +0100
commit5386380462b2ccbb58d5ec5b9a2b19c934525b84 (patch)
tree0bfec9a9c684105a0dbc3d5733c54108df014eeb
parente463c1df065e8aee0428e7156fdcc91f4d06d6c1 (diff)
downloadluci2-ui-5386380462b2ccbb58d5ec5b9a2b19c934525b84.tar.gz
luci2.uci: don't allow set() with empty string values
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
-rw-r--r--luci2/htdocs/luci2/uci.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/luci2/htdocs/luci2/uci.js b/luci2/htdocs/luci2/uci.js
index 2056ce9..c751de3 100644
--- a/luci2/htdocs/luci2/uci.js
+++ b/luci2/htdocs/luci2/uci.js
@@ -303,7 +303,7 @@ Class.extend({
else
delete n[conf][sid][opt];
}
- else if (typeof(val) != 'undefined')
+ else if (typeof(val) != 'undefined' && val !== '')
{
/* do not set within deleted section */
if (d[conf] && d[conf][sid] === true)