Skip to content

Commit

Permalink
Fixed crashing with bullet numbering
Browse files Browse the repository at this point in the history
  • Loading branch information
VolodymyrBaydalka committed May 1, 2024
1 parent 589b3cf commit 2a42da3
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion dist/docx-preview.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/docx-preview.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/docx-preview.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/docx-preview.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/docx-preview.min.mjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/docx-preview.min.mjs.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/docx-preview.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1708,7 +1708,7 @@ class DocumentParser {
break;
case "lvlPicBulletId":
var id = globalXmlParser.intAttr(n, "val");
result.bullet = bullets.find(x => x.id == id);
result.bullet = bullets.find(x => x?.id == id);
break;
case "lvlText":
result.levelText = globalXmlParser.attr(n, "val");
Expand Down
2 changes: 1 addition & 1 deletion dist/docx-preview.mjs.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/document-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ export class DocumentParser {

case "lvlPicBulletId":
var id = xml.intAttr(n, "val");
result.bullet = bullets.find(x => x.id == id);
result.bullet = bullets.find(x => x?.id == id);
break;

case "lvlText":
Expand Down

0 comments on commit 2a42da3

Please sign in to comment.