Skip to content

Commit 9a34fef

Browse files
committed
Return true early from needMaskingText if maskTextSelector is *
1 parent af573f9 commit 9a34fef

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/rrweb-snapshot/src/snapshot.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ export function needMaskingText(
273273
let el: Element;
274274
if (isElement(node)) {
275275
el = node;
276+
if (maskTextSelector === '*') return true;
276277
if (!dom.childNodes(el).length) {
277278
// optimisation: we can avoid any of the below checks on leaf elements
278279
// as masking is applied to child text nodes only

0 commit comments

Comments
 (0)