Skip to content

Commit be63cf0

Browse files
Fix a potential error
1 parent cea675a commit be63cf0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

highlight-helper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -994,7 +994,7 @@ function Highlighter(options = hhDefaultOptions) {
994994
if (direction == 'backward') {
995995
return [ firstTextNode, 0 ];
996996
} else {
997-
const lastTextNode = walker.previousNode();
997+
const lastTextNode = walker.currentNode;
998998
return [ lastTextNode, lastTextNode.textContent.length ];
999999
}
10001000
}

0 commit comments

Comments
 (0)