Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
straker committed Dec 8, 2022
1 parent dc8656b commit de4c3ef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/commons/dom/get-visible-child-text-rects.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ const getVisibleChildTextRects = memoize(
const clientRects = [];
const overflowHiddenNodes = getOverflowHiddenAncestors(vNode);

node.childNodes.forEach(elm => {
if (elm.nodeType !== 3 || sanitize(elm.textContent) === '') {
node.childNodes.forEach(textNode => {
if (textNode.nodeType !== 3 || sanitize(textNode.nodeValue) === '') {
return;
}

const contentRects = getContentRects(elm);
const contentRects = getContentRects(textNode);
if (isOutsideNodeBounds(contentRects, nodeRect)) {
return;
}
Expand Down

0 comments on commit de4c3ef

Please sign in to comment.