aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--util/dataforms.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/util/dataforms.lua b/util/dataforms.lua
index a5826d91..06b74886 100644
--- a/util/dataforms.lua
+++ b/util/dataforms.lua
@@ -26,7 +26,8 @@ local function new(layout)
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