Fixed automatically converted optional chain
This commit is contained in:
parent
932785b132
commit
8969b2451d
|
|
@ -201,7 +201,8 @@ const kPresentationInheritanceParents: { [tagName: string]: string[] } = {
|
||||||
};
|
};
|
||||||
|
|
||||||
function getImplicitAriaRole(element: Element): AriaRole | null {
|
function getImplicitAriaRole(element: Element): AriaRole | null {
|
||||||
const implicitRole = kImplicitRoleByTagName[elementSafeTagName(element)](element) || '';
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
||||||
|
const implicitRole = kImplicitRoleByTagName[elementSafeTagName(element)]?.(element) || '';
|
||||||
if (!implicitRole) {
|
if (!implicitRole) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue