diff options
| author | Michael Williamson <mike@zwobble.org> | 2017-02-19 21:13:30 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2017-02-19 21:13:30 +0000 |
| commit | da79f71bc6bcc39d006bbf9c8171dc32292641c6 (patch) | |
| tree | ff07ddffd1b9617b346190e5caa21620c6d2cf14 /lib | |
| parent | 16f9304b57cd7553f42a01da0418c9d8f9954e76 (diff) | |
Remove duplicated push
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/docx/body-reader.js | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/docx/body-reader.js b/lib/docx/body-reader.js index 6155304..5c2c7b3 100644 --- a/lib/docx/body-reader.js +++ b/lib/docx/body-reader.js @@ -165,11 +165,8 @@ function BodyReader(options) { complexFieldStack.pop(); } else if (type === "separate") { var href = parseHyperlinkFieldCode(currentInstrText.join('')); - if (href !== null) { - complexFieldStack.push({type: "hyperlink", href: href}); - } else { - complexFieldStack.push({type: "unknown"}); - } + var complexField = href === null ? {type: "unknown"} : {type: "hyperlink", href: href}; + complexFieldStack.push(complexField); } return emptyResult(); }, |
