Teact: Fix removing attributes from element (#2655)
This commit is contained in:
parent
20eeaf53bd
commit
c235eac2d0
@ -678,10 +678,8 @@ function removeAttribute(element: HTMLElement, key: string, value: any) {
|
||||
element.innerHTML = '';
|
||||
} else if (key.startsWith('on')) {
|
||||
removeEventListener(element, key, value, key.endsWith('Capture'));
|
||||
} else if (key.startsWith('data-') || key.startsWith('aria-') || HTML_ATTRIBUTES.has(key)) {
|
||||
element.removeAttribute(key);
|
||||
} else if (!FILTERED_ATTRIBUTES.has(key)) {
|
||||
delete (element as any)[MAPPED_ATTRIBUTES[key] || key];
|
||||
element.removeAttribute(key);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user