Skip to content

Commit

Permalink
No issue: Optimize tracking be excluding elements that contain no text
Browse files Browse the repository at this point in the history
  • Loading branch information
reckart committed Dec 3, 2023
1 parent 1fd9604 commit 5cd5f9a
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ export class ViewportTracker {
return false
}

if (!element.textContent) {
return false;
}

return style.display === 'block' || style.display === 'flex' || style.display === 'grid' ||
style.display === 'table-row'

Expand Down

0 comments on commit 5cd5f9a

Please sign in to comment.