We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8bf6caf + 5fe4b1f commit 72c3288Copy full SHA for 72c3288
1 file changed
src/dom.ts
@@ -36,11 +36,11 @@ export const updateElement = (
36
} else if (name in dom && !(dom instanceof SVGElement)) {
37
dom[name] = b || ''
38
} else if (b == null || b === false) {
39
- // @ts-expect-error Property 'removeAttribute' does not exist on type 'Text'.
40
- dom.removeAttribute(name)
+ // @ts-expect-error Property 'removeAttribute' does not exist on type 'Text' | type 'Commit'
+ dom.removeAttribute?.(name)
41
} else {
42
- // @ts-expect-error Property 'setAttribute' does not exist on type 'Text'.
43
- dom.setAttribute && dom?.setAttribute(name, b)
+ // @ts-expect-error Property 'setAttribute' does not exist on type 'Text' | type 'Commit'
+ dom.setAttribute?.(name, b)
44
}
45
})
46
0 commit comments