check attribute is null instead of any falsy value

This commit is contained in:
Yanzhen Yu
2026-04-01 12:00:00 +08:00
parent 281eca7fe2
commit da54061b53
2 changed files with 5 additions and 1 deletions

View File

@@ -409,7 +409,7 @@ export class Replayer {
for (const attributeName in mutation.attributes) {
if (typeof attributeName === 'string') {
const value = mutation.attributes[attributeName];
if (value) {
if (value !== null) {
((target as Node) as Element).setAttribute(
attributeName,
value,