Skip to content

Commit c6f5169

Browse files
committed
Avoid duplicating default level index
1 parent cee62ee commit c6f5169

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/docx/numbering-xml.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ function readAbstractNum(element) {
9191
}
9292
});
9393

94-
if (levels["0"] === undefined && levelWithoutIndex !== null) {
95-
levels["0"] = levelWithoutIndex;
94+
if (levelWithoutIndex !== null && levels[levelWithoutIndex.level] === undefined) {
95+
levels[levelWithoutIndex.level] = levelWithoutIndex;
9696
}
9797

9898
var numStyleLink = element.firstOrEmpty("w:numStyleLink").attributes["w:val"];

0 commit comments

Comments
 (0)