Apply strictNullChecks to src/components/views/location/* (#10249

* strict fixes

* accessiblebutton without onClick explicit

* strict fix for UserMenu BaseAvatar
This commit is contained in:
Kerry
2023-02-28 21:55:59 +13:00
committed by GitHub
parent 6de8d85f7e
commit dd6fc124d7
12 changed files with 46 additions and 31 deletions

View File

@@ -31,7 +31,7 @@ interface IProps extends IDialogProps {
}
interface IState {
error: Error;
error?: Error;
}
/**
@@ -58,7 +58,7 @@ export default class LocationViewDialog extends React.Component<IProps, IState>
const { mxEvent } = this.props;
// only pass member to marker when should render avatar marker
const markerRoomMember = isSelfLocation(mxEvent.getContent()) ? mxEvent.sender : undefined;
const markerRoomMember = (isSelfLocation(mxEvent.getContent()) && mxEvent.sender) || undefined;
const geoUri = locationEventGeoUri(mxEvent);
return (
<BaseDialog className="mx_LocationViewDialog" onFinished={this.props.onFinished} fixedWidth={false}>