Use MatrixClientPeg::safeGet in src/{stores,hooks,components/structures}/* (#10988)
This commit is contained in:
parent
707fd9ccf0
commit
dd46db4817
34 changed files with 139 additions and 130 deletions
|
@ -63,8 +63,8 @@ export default class NotificationPanel extends React.PureComponent<IProps, IStat
|
|||
</div>
|
||||
);
|
||||
|
||||
let content;
|
||||
const timelineSet = MatrixClientPeg.get().getNotifTimelineSet();
|
||||
let content: JSX.Element;
|
||||
const timelineSet = MatrixClientPeg.safeGet().getNotifTimelineSet();
|
||||
if (timelineSet) {
|
||||
// wrap a TimelinePanel with the jump-to-event bits turned off.
|
||||
content = (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue