mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-14 21:13:54 +01:00
Add None check to _iterate_over_text
This commit is contained in:
parent
f743471380
commit
f90b3d83a3
1 changed files with 1 additions and 1 deletions
|
@ -449,7 +449,7 @@ def _iterate_over_text(tree, *tags_to_ignore):
|
||||||
el = elements.next()
|
el = elements.next()
|
||||||
if isinstance(el, basestring):
|
if isinstance(el, basestring):
|
||||||
yield el
|
yield el
|
||||||
elif el.tag not in tags_to_ignore:
|
elif el is not None and el.tag not in tags_to_ignore:
|
||||||
# el.text is the text before the first child, so we can immediately
|
# el.text is the text before the first child, so we can immediately
|
||||||
# return it if the text exists.
|
# return it if the text exists.
|
||||||
if el.text:
|
if el.text:
|
||||||
|
|
Loading…
Reference in a new issue