diff options
| author | Michael Williamson <mike@zwobble.org> | 2021-05-11 22:24:27 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2021-05-11 22:24:27 +0100 |
| commit | 9420bb9bea5b44f475d32e12b2e50e96a888d900 (patch) | |
| tree | 03be26b2232cb70a3510f2854e83f50c7865a182 /lib | |
| parent | c2d79f884373c93f1bd222f86c8057354837709a (diff) | |
Handle w:num with invalid w:abstractNumId
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/docx/numbering-xml.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/docx/numbering-xml.js b/lib/docx/numbering-xml.js index 64c4210..832e414 100644 --- a/lib/docx/numbering-xml.js +++ b/lib/docx/numbering-xml.js @@ -20,7 +20,9 @@ function Numbering(nums, abstractNums, styles) { var num = nums[numId]; if (num) { var abstractNum = abstractNums[num.abstractNumId]; - if (abstractNum.numStyleLink == null) { + if (!abstractNum) { + return null; + } else if (abstractNum.numStyleLink == null) { return abstractNums[num.abstractNumId].levels[level]; } else { var style = styles.findNumberingStyleById(abstractNum.numStyleLink); |
