aboutsummaryrefslogtreecommitdiff
path: root/lib/docx
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2026-12-05 19:24:00 +0000
committerMichael Williamson <mike@zwobble.org>2026-12-05 19:24:00 +0000
commita3a22525e85db9f9b576fa3b3e4210778d9d7603 (patch)
tree9a683b4ee21beb70b135b316116873cc4cbc5643 /lib/docx
parent2fe97dd468faa0d89cd6069bd0ba3b08c38e362e (diff)
Revert "Handle XML documents that are missing a root element"
This reverts commit ae06a2bacfb74c88340e900e8a29336418936e9e.
Diffstat (limited to 'lib/docx')
-rw-r--r--lib/docx/office-xml-reader.js6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/docx/office-xml-reader.js b/lib/docx/office-xml-reader.js
index 6d2c1e9..792cd7c 100644
--- a/lib/docx/office-xml-reader.js
+++ b/lib/docx/office-xml-reader.js
@@ -38,11 +38,7 @@ var xmlNamespaceMap = {
function read(xmlString) {
return xml.readString(xmlString, xmlNamespaceMap)
.then(function(document) {
- if (document === null) {
- return null;
- } else {
- return collapseAlternateContent(document)[0];
- }
+ return collapseAlternateContent(document)[0];
});
}