Software /
code /
prosody
Changeset
7446:0db72fac2faa
util.dataforms: Fix including default value for list-single when given as field.value[].default
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 29 May 2016 15:57:03 +0200 |
parents | 7445:6d2038147d3d |
children | 7447:843fe134453e 7448:34678ce8a6ac |
files | util/dataforms.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/util/dataforms.lua Sat May 28 13:10:40 2016 +0200 +++ b/util/dataforms.lua Sun May 29 15:57:03 2016 +0200 @@ -72,7 +72,7 @@ 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