We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3c5ccf6 commit 552f19bCopy full SHA for 552f19b
src/runtime/internal/dom.ts
@@ -86,7 +86,7 @@ export function self(fn) {
86
87
export function attr(node: Element, attribute: string, value?: string) {
88
if (value == null) node.removeAttribute(attribute);
89
- else node.setAttribute(attribute, value);
+ else if (node.getAttribute(attribute) !== value) node.setAttribute(attribute, value);
90
}
91
92
export function set_attributes(node: Element & ElementCSSInlineStyle, attributes: { [x: string]: string }) {
0 commit comments