aboutsummaryrefslogtreecommitdiff
path: root/lib/docx
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2025-09-11 15:32:29 +0100
committerMichael Williamson <mike@zwobble.org>2025-09-11 15:32:29 +0100
commitc6f51699f86176276ffc6d22f2cd0a2b1c592c3e (patch)
tree3c8be9d4f977f80d615d9c63465e3ed5bf1a011d /lib/docx
parentcee62eea4e52484a473128f342e2a497e32261b7 (diff)
Avoid duplicating default level index
Diffstat (limited to 'lib/docx')
-rw-r--r--lib/docx/numbering-xml.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/docx/numbering-xml.js b/lib/docx/numbering-xml.js
index c41477e..544ba52 100644
--- a/lib/docx/numbering-xml.js
+++ b/lib/docx/numbering-xml.js
@@ -91,8 +91,8 @@ function readAbstractNum(element) {
}
});
- if (levels["0"] === undefined && levelWithoutIndex !== null) {
- levels["0"] = levelWithoutIndex;
+ if (levelWithoutIndex !== null && levels[levelWithoutIndex.level] === undefined) {
+ levels[levelWithoutIndex.level] = levelWithoutIndex;
}
var numStyleLink = element.firstOrEmpty("w:numStyleLink").attributes["w:val"];