mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 04:09:12 +00:00
Enhance icon button label check (#1543)
This commit is contained in:
@@ -181,7 +181,7 @@ export default class WaButton extends WebAwesomeFormAssociatedElement {
|
||||
[...nodes].forEach(node => {
|
||||
if (node.nodeType === Node.ELEMENT_NODE && (node as HTMLElement).localName === 'wa-icon') {
|
||||
hasIcon = true;
|
||||
if (!hasIconLabel) hasIconLabel = (node as HTMLElement).hasAttribute('label');
|
||||
if (!hasIconLabel) hasIconLabel = (node as HTMLElement).label !== undefined;
|
||||
}
|
||||
|
||||
// Concatenate text nodes
|
||||
|
||||
Reference in New Issue
Block a user