eslint to 8.9.0 (#7889)

Signed-off-by: Kerry Archibald <kerrya@element.io>
This commit is contained in:
Kerry 2022-02-24 15:54:06 +01:00 committed by GitHub
parent c257bc3f7a
commit 6e143c313e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 105 additions and 89 deletions

View file

@ -667,7 +667,11 @@ export default class RoomList extends React.PureComponent<IProps, IState> {
public focus(): void {
// focus the first focusable element in this aria treeview widget
[...this.treeRef.current?.querySelectorAll<HTMLElement>('[role="treeitem"]')]
const treeItems = this.treeRef.current?.querySelectorAll<HTMLElement>('[role="treeitem"]');
if (treeItems) {
return;
}
[...treeItems]
.find(e => e.offsetParent !== null)?.focus();
}