Skip to content

Commit f83652a

Browse files
committed
Return true early from needMaskingText if maskTextSelector is *
1 parent 69c98b4 commit f83652a

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
@@ -272,6 +272,7 @@ export function needMaskingText(
272272
let el: Element;
273273
if (isElement(node)) {
274274
el = node;
275+
if (maskTextSelector === '*') return true;
275276
if (!dom.childNodes(el).length) {
276277
// optimisation: we can avoid any of the below checks on leaf elements
277278
// as masking is applied to child text nodes only

0 commit comments

Comments
 (0)