Conform more of the codebase to strictNullChecks
(#10666)
* Conform more of the codebase to `strictNullChecks` * Iterate * Iterate * Iterate * Iterate
This commit is contained in:
parent
8867f1801e
commit
93b4ee654b
17 changed files with 126 additions and 114 deletions
|
@ -433,9 +433,11 @@ export default class RoomSublist extends React.Component<IProps, IState> {
|
|||
};
|
||||
|
||||
private onHeaderClick = (): void => {
|
||||
const possibleSticky = this.headerButton.current.parentElement;
|
||||
const sublist = possibleSticky.parentElement.parentElement;
|
||||
const list = sublist.parentElement.parentElement;
|
||||
const possibleSticky = this.headerButton.current?.parentElement;
|
||||
const sublist = possibleSticky?.parentElement?.parentElement;
|
||||
const list = sublist?.parentElement?.parentElement;
|
||||
if (!possibleSticky || !list) return;
|
||||
|
||||
// the scrollTop is capped at the height of the header in LeftPanel, the top header is always sticky
|
||||
const listScrollTop = Math.round(list.scrollTop);
|
||||
const isAtTop = listScrollTop <= Math.round(HEADER_HEIGHT);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue