File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -1326,13 +1326,11 @@ export class Replayer {
13261326 for ( const attributeName in mutation . attributes ) {
13271327 if ( typeof attributeName === 'string' ) {
13281328 const value = mutation . attributes [ attributeName ] ;
1329- if ( typeof value === 'string' ) {
1329+ if ( value === null ) {
1330+ ( ( target as Node ) as Element ) . removeAttribute ( attributeName ) ;
1331+ } else if ( typeof value === 'string' ) {
13301332 try {
1331- if ( value !== null ) {
1332- ( ( target as Node ) as Element ) . setAttribute ( attributeName , value ) ;
1333- } else {
1334- ( ( target as Node ) as Element ) . removeAttribute ( attributeName ) ;
1335- }
1333+ ( ( target as Node ) as Element ) . setAttribute ( attributeName , value ) ;
13361334 } catch ( error ) {
13371335 if ( this . config . showWarning ) {
13381336 console . warn (
You can’t perform that action at this time.
0 commit comments