You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-30 02:21:17 +03:00
Conform more code to strict null checking (#10167)
* Conform more code to strict null checking * Delint * Iterate PR based on feedback
This commit is contained in:
committed by
GitHub
parent
f7bea2cae5
commit
4574c665ea
@ -121,11 +121,11 @@ export const SpaceButton = forwardRef<HTMLElement, IButtonProps>(
|
||||
);
|
||||
}
|
||||
|
||||
let contextMenu: JSX.Element;
|
||||
if (menuDisplayed && ContextMenuComponent) {
|
||||
let contextMenu: JSX.Element | undefined;
|
||||
if (menuDisplayed && handle.current && ContextMenuComponent) {
|
||||
contextMenu = (
|
||||
<ContextMenuComponent
|
||||
{...toRightOf(handle.current?.getBoundingClientRect(), 0)}
|
||||
{...toRightOf(handle.current.getBoundingClientRect(), 0)}
|
||||
space={space}
|
||||
onFinished={closeMenu}
|
||||
/>
|
||||
@ -242,7 +242,7 @@ export class SpaceItem extends React.PureComponent<IItemProps, IItemState> {
|
||||
}
|
||||
|
||||
private get isCollapsed(): boolean {
|
||||
return this.state.collapsed || this.props.isPanelCollapsed;
|
||||
return this.state.collapsed || !!this.props.isPanelCollapsed;
|
||||
}
|
||||
|
||||
private toggleCollapse = (evt: ButtonEvent): void => {
|
||||
|
Reference in New Issue
Block a user