diff options
| author | Michael Williamson <mike@zwobble.org> | 2025-05-28 19:56:36 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2025-05-28 19:56:36 +0100 |
| commit | e7041cb3e4188c24ca6efbd383df183518d7840d (patch) | |
| tree | f54154b2853ff55825396ac8c39da2fc2a93d313 /mammoth/docx | |
| parent | a095ca26ed2a0a5394ecd43e927a063b9a30542b (diff) | |
Ignore AlternateContent elements when there is no Fallback element
Diffstat (limited to 'mammoth/docx')
| -rw-r--r-- | mammoth/docx/body_xml.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mammoth/docx/body_xml.py b/mammoth/docx/body_xml.py index cc4e9ad..40b5f9d 100644 --- a/mammoth/docx/body_xml.py +++ b/mammoth/docx/body_xml.py @@ -569,7 +569,7 @@ def _create_reader(numbering, content_types, relationships, styles, docx_file, f return _success(documents.comment_reference(element.attributes["w:id"])) def alternate_content(element): - return read_child_elements(element.find_child("mc:Fallback")) + return read_child_elements(element.find_child_or_null("mc:Fallback")) def read_sdt(element): checkbox = element.find_child_or_null("w:sdtPr").find_child("wordml:checkbox") |
