fix tests and better dingdong

This commit is contained in:
John McLear 2021-01-03 11:51:35 +00:00
parent eba5827092
commit 8803c23a2d
2 changed files with 13 additions and 12 deletions

View file

@ -434,7 +434,9 @@ Scroll.prototype.getCountOfVisibleCharsInViewport = (line, viewport) => {
// each character
let i = 0;
console.log(node);
if (!node || !node.childNodes) return;
node = node.childNodes[0];
if (!node) return; // temp patch to be removed.
if (node.childNodes && node.childNodes[1].length === 0) return;
console.log(node);
console.log(node.wholeText.length);