File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
packages/rrweb-snapshot/src Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' rrweb-snapshot ' : patch
3+ ---
4+
5+ allow passing null to maskTextClass/blockClass
Original file line number Diff line number Diff line change @@ -268,7 +268,7 @@ export function _isBlockedElement(
268268 if ( element . classList . contains ( blockClass ) ) {
269269 return true ;
270270 }
271- } else {
271+ } else if ( blockClass ) {
272272 for ( let eIndex = element . classList . length ; eIndex -- ; ) {
273273 const className = element . classList [ eIndex ] ;
274274 if ( blockClass . test ( className ) ) {
@@ -292,6 +292,7 @@ export function classMatchesRegex(
292292 checkAncestors : boolean ,
293293) : boolean {
294294 if ( ! node ) return false ;
295+ if ( ! regex ) return false ;
295296 if ( node . nodeType !== node . ELEMENT_NODE ) {
296297 if ( ! checkAncestors ) return false ;
297298 return classMatchesRegex ( node . parentNode , regex , checkAncestors ) ;
You can’t perform that action at this time.
0 commit comments