@@ -486,8 +486,9 @@ export default class MutationBuffer {
486486 }
487487 case 'attributes' : {
488488 const target = m . target as HTMLElement ;
489- let value = ( m . target as HTMLElement ) . getAttribute ( m . attributeName ! ) ;
490- if ( m . attributeName === 'value' ) {
489+ let attributeName = m . attributeName as string ;
490+ let value = ( m . target as HTMLElement ) . getAttribute ( attributeName ) ;
491+ if ( attributeName === 'value' ) {
491492 value = maskInputValue ( {
492493 maskInputOptions : this . maskInputOptions ,
493494 tagName : ( m . target as HTMLElement ) . tagName ,
@@ -508,13 +509,13 @@ export default class MutationBuffer {
508509 ) ;
509510 if (
510511 target . tagName === 'IFRAME' &&
511- m . attributeName === 'src' &&
512+ attributeName === 'src' &&
512513 ! this . keepIframeSrcFn ( value as string )
513514 ) {
514515 if ( ! ( target as HTMLIFrameElement ) . contentDocument ) {
515516 // we can't record it directly as we can't see into it
516517 // preserve the src attribute so a decision can be taken at replay time
517- m . attributeName = 'rr_src' ;
518+ attributeName = 'rr_src' ;
518519 } else {
519520 return ;
520521 }
@@ -526,7 +527,7 @@ export default class MutationBuffer {
526527 } ;
527528 this . attributes . push ( item ) ;
528529 }
529- if ( m . attributeName === 'style' ) {
530+ if ( attributeName === 'style' ) {
530531 const old = this . doc . createElement ( 'span' ) ;
531532 if ( m . oldValue ) {
532533 old . setAttribute ( 'style' , m . oldValue ) ;
@@ -558,12 +559,12 @@ export default class MutationBuffer {
558559 styleObj [ pname ] = false ; // delete
559560 }
560561 }
561- } else if ( ! ignoreAttribute ( target . tagName , m . attributeName ! , value ) ) {
562+ } else if ( ! ignoreAttribute ( target . tagName , attributeName , value ) ) {
562563 // overwrite attribute if the mutations was triggered in same time
563- item . attributes [ m . attributeName ! ] = transformAttribute (
564+ item . attributes [ attributeName ] = transformAttribute (
564565 this . doc ,
565566 target . tagName ,
566- m . attributeName ! ,
567+ attributeName ,
567568 value ,
568569 ) ;
569570 }
0 commit comments