aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-05-29 15:57:03 +0200
committerKim Alvefur <zash@zash.se>2016-05-29 15:57:03 +0200
commit6b2c577b2097728507d23a6d2b2fa9207a22df9d (patch)
tree95375839b0422a6f0be2479d935d917e2b1b04ce
parent7f091c5a3bc0de7d116fca5f9d5e170c0752efaf (diff)
downloadprosody-6b2c577b2097728507d23a6d2b2fa9207a22df9d.tar.gz
prosody-6b2c577b2097728507d23a6d2b2fa9207a22df9d.zip
util.dataforms: Fix including default value for list-single when given as field.value[].default
-rw-r--r--util/dataforms.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/dataforms.lua b/util/dataforms.lua
index 685f3aaf..756f35a7 100644
--- a/util/dataforms.lua
+++ b/util/dataforms.lua
@@ -72,7 +72,7 @@ function form_t.form(layout, data, formtype)
for _, val in ipairs(field.options or value) do
if type(val) == "table" then
form:tag("option", { label = val.label }):tag("value"):text(val.value):up():up();
- if value == val.value or field.options and val.default and (not has_default) then
+ if value == val.value or val.default and (not has_default) then
form:tag("value"):text(val.value):up();
has_default = true;
end