aboutsummaryrefslogtreecommitdiff
path: root/mammoth/raw_text.py
diff options
context:
space:
mode:
Diffstat (limited to 'mammoth/raw_text.py')
-rw-r--r--mammoth/raw_text.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mammoth/raw_text.py b/mammoth/raw_text.py
index fb39acf..ccf50ed 100644
--- a/mammoth/raw_text.py
+++ b/mammoth/raw_text.py
@@ -5,7 +5,7 @@ def extract_raw_text_from_element(element):
if isinstance(element, documents.Text):
return element.value
else:
- text = "".join(map(extract_raw_text_from_element, element.children))
+ text = "".join(map(extract_raw_text_from_element, getattr(element, "children", [])))
if isinstance(element, documents.Paragraph):
return text + "\n\n"
else: