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 {
1326
1326
for ( const attributeName in mutation . attributes ) {
1327
1327
if ( typeof attributeName === 'string' ) {
1328
1328
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' ) {
1330
1332
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 ) ;
1336
1334
} catch ( error ) {
1337
1335
if ( this . config . showWarning ) {
1338
1336
console . warn (
You can’t perform that action at this time.
0 commit comments