aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2024-03-20 18:55:13 +0000
committerMichael Williamson <mike@zwobble.org>2024-03-20 18:55:13 +0000
commit59a6ddc8938915f17fb4df4d6ff27451af79c6ad (patch)
treed09cca42364aa9d04f3efbae19948c83aec2a118 /lib
parent00c2a1f90221602dbbf1706c5ac9920808c1130d (diff)
Handle numbering level definitions without an explicit format
Diffstat (limited to 'lib')
-rw-r--r--lib/docx/numbering-xml.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/docx/numbering-xml.js b/lib/docx/numbering-xml.js
index 832e414..7e368ac 100644
--- a/lib/docx/numbering-xml.js
+++ b/lib/docx/numbering-xml.js
@@ -66,7 +66,7 @@ function readAbstractNum(element) {
var levels = {};
element.getElementsByTagName("w:lvl").forEach(function(levelElement) {
var levelIndex = levelElement.attributes["w:ilvl"];
- var numFmt = levelElement.first("w:numFmt").attributes["w:val"];
+ var numFmt = levelElement.firstOrEmpty("w:numFmt").attributes["w:val"];
var paragraphStyleId = levelElement.firstOrEmpty("w:pStyle").attributes["w:val"];
levels[levelIndex] = {