aboutsummaryrefslogtreecommitdiff
path: root/mammoth/docx
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2025-05-28 20:01:21 +0100
committerMichael Williamson <mike@zwobble.org>2025-05-28 20:01:21 +0100
commitdd8b47154b2f9109eb6041302902d85fad6ceb08 (patch)
treec9609ed582a19a1db3b0f50db19624b2fd3f4e60 /mammoth/docx
parente7041cb3e4188c24ca6efbd383df183518d7840d (diff)
Handle AlternateContent without Fallback in office_xml
Diffstat (limited to 'mammoth/docx')
-rw-r--r--mammoth/docx/office_xml.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mammoth/docx/office_xml.py b/mammoth/docx/office_xml.py
index a988894..6506127 100644
--- a/mammoth/docx/office_xml.py
+++ b/mammoth/docx/office_xml.py
@@ -37,7 +37,7 @@ def read(fileobj):
def _collapse_alternate_content(node):
if isinstance(node, XmlElement):
if node.name == "mc:AlternateContent":
- return node.find_child("mc:Fallback").children
+ return node.find_child_or_null("mc:Fallback").children
else:
node.children = flat_map(_collapse_alternate_content, node.children)
return [node]