Skip to content

Commit

Permalink
Fix #1099 - new code caused issue with existing tests so additional c…
Browse files Browse the repository at this point in the history
…heck included
  • Loading branch information
JohnSmith-LT committed Jul 18, 2022
1 parent 53dc1a9 commit 5ad62fb
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -4596,7 +4596,7 @@ var XENITH = (function ($, parent) { var self = parent.GLOSSARY = {};
}

// Need to treat single text node differently but rebuild from fragmant
tempText = Array.from(fragment.childNodes).length === 1 ? nodes[0].textContent : Array.from(fragment.childNodes).map(function(x) {return x.outerHTML || x.textContent;}).join('');
tempText = Array.from(fragment.childNodes).length === 1 && nodes.length > 0 ? nodes[0].textContent : Array.from(fragment.childNodes).map(function(x) {return x.outerHTML || x.textContent;}).join('');

// Replace all our tokens with the glossary tag
for (var k=0, len=x_glossary.length; k<len; k++) {
Expand Down

0 comments on commit 5ad62fb

Please sign in to comment.