author | Matthew Wild <mwild1@gmail.com> |
Wed, 21 Mar 2018 22:04:20 +0000 | |
changeset 8643 | 8f13ec2ceb06 |
parent 8642 | 070a77c15f63 |
child 8644 | c7734b59506f |
util/stanza.lua | file | annotate | diff | comparison | revisions |
--- a/util/stanza.lua Wed Mar 21 16:31:48 2018 +0100 +++ b/util/stanza.lua Wed Mar 21 22:04:20 2018 +0000 @@ -111,9 +111,11 @@ end function stanza_mt:text(text) - check_text(text, "text"); - local last_add = self.last_add; - (last_add and last_add[#last_add] or self):add_direct_child(text); + if text ~= nil and text ~= "" then + check_text(text, "text"); + local last_add = self.last_add; + (last_add and last_add[#last_add] or self):add_direct_child(text); + end return self; end