diff options
| author | Michael Williamson <mike@zwobble.org> | 2017-05-30 11:33:42 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2017-05-30 11:33:42 +0100 |
| commit | e7d903d254f0feecc4db3adc4d4d3e20aa61bd85 (patch) | |
| tree | e94d8335eb2f6ecbd26af9522bd958b5aea72f4e /test | |
| parent | 9545703e5e3cd3f0cbce363eda1d2c92e4eb0da0 (diff) | |
Set target frame to null when empty string
Diffstat (limited to 'test')
| -rw-r--r-- | test/docx/body-reader.tests.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/docx/body-reader.tests.js b/test/docx/body-reader.tests.js index f866e9b..4632e3b 100644 --- a/test/docx/body-reader.tests.js +++ b/test/docx/body-reader.tests.js @@ -955,6 +955,15 @@ test("w:hyperlink", { var result = readXmlElementValue(hyperlinkXml); assertThat(result, hasProperties({targetFrame: "_blank"})); }, + + "empty target frame is ignored": function() { + var hyperlinkXml = new XmlElement("w:hyperlink", { + "w:anchor": "Introduction", + "w:tgtFrame": "" + }); + var result = readXmlElementValue(hyperlinkXml); + assertThat(result, hasProperties({targetFrame: null})); + } }); test("w:br without explicit type is read as line break", function() { |
