Dynannotate: Fix undefined class

This commit is contained in:
jeremy@jermolene.com 2022-12-07 17:10:45 +00:00
parent 28c1e6bfc3
commit 9f867ad51e
1 changed files with 1 additions and 1 deletions

View File

@ -332,7 +332,7 @@ DynannotateWidget.prototype.applySnippets = function() {
// Output the match
container.appendChild($tw.utils.domMaker("span",{
text: textMap.string.slice(match.startPos,match.endPos),
"class": "tc-dynannotate-snippet-highlight " + self.getAttribute("searchClass")
"class": "tc-dynannotate-snippet-highlight " + self.getAttribute("searchClass","")
}));
// Does the context of this match merge into the next?
merged = index < matches.length - 1 && matches[index + 1].startPos - match.endPos <= 2 * contextLength;