# HG changeset patch # User Kim Alvefur # Date 1533322755 -7200 # Node ID 9e45e7adcebf000d2cc510dc5c9fdb770f652e5c # Parent 74b4be5afb748357756904d200910d365da11dc2 util.dataforms: Set default value for form type argument diff -r 74b4be5afb74 -r 9e45e7adcebf util/dataforms.lua --- a/util/dataforms.lua Fri Aug 03 20:51:08 2018 +0200 +++ b/util/dataforms.lua Fri Aug 03 20:59:15 2018 +0200 @@ -26,7 +26,8 @@ end function form_t.form(layout, data, formtype) - local form = st.stanza("x", { xmlns = xmlns_forms, type = formtype or "form" }); + if not formtype then formtype = "form" end + local form = st.stanza("x", { xmlns = xmlns_forms, type = formtype }); if layout.title then form:tag("title"):text(layout.title):up(); end