diff --git a/src/runtime/internal/dom.ts b/src/runtime/internal/dom.ts index 452347dc29..89025c881c 100644 --- a/src/runtime/internal/dom.ts +++ b/src/runtime/internal/dom.ts @@ -100,7 +100,7 @@ export function set_attributes(node: Element & ElementCSSInlineStyle, attributes for (const key in attributes) { if (key === 'style') { node.style.cssText = attributes[key]; - } else if (key in node) { + } else if (key in node && attributes[key] != null) { node[key] = attributes[key]; } else { attr(node, key, attributes[key]);