diff options
Diffstat (limited to 'teal-src')
-rw-r--r-- | teal-src/prosody/util/xtemplate.tl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/teal-src/prosody/util/xtemplate.tl b/teal-src/prosody/util/xtemplate.tl index 9b6b678b..84003051 100644 --- a/teal-src/prosody/util/xtemplate.tl +++ b/teal-src/prosody/util/xtemplate.tl @@ -54,7 +54,10 @@ local function render(template : string, root : st.stanza_t, escape : escape_t, if tmpl then tmpl = s_sub(tmpl, 2, -2); end if args then args = s_sub(args, 2, -2); end - if func == "each" and tmpl and st.is_stanza(value) then + if func == "each" and tmpl then + if not st.is_stanza(value) then + return pre_blank..post_blank; + end if not args then value, args = root, path; end local ns, name = s_match(args, "^(%b{})(.*)$"); if ns then ns = s_sub(ns, 2, -2); else name, ns = args, nil; end |