mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-04 01:19:41 +00:00
Use MatrixClientPeg::safeGet in src/{stores,hooks,components/structures}/* (#10988)
This commit is contained in:
committed by
GitHub
parent
707fd9ccf0
commit
dd46db4817
@@ -310,7 +310,7 @@ export default class RightPanelStore extends ReadyWatchingStore {
|
||||
// RightPanelPhases.RoomMemberInfo -> needs to be changed to RightPanelPhases.EncryptionPanel if there is a pending verification request
|
||||
const { member } = card.state;
|
||||
const pendingRequest = member
|
||||
? pendingVerificationRequestForUser(MatrixClientPeg.get(), member)
|
||||
? pendingVerificationRequestForUser(MatrixClientPeg.safeGet(), member)
|
||||
: undefined;
|
||||
if (pendingRequest) {
|
||||
return {
|
||||
@@ -344,7 +344,7 @@ export default class RightPanelStore extends ReadyWatchingStore {
|
||||
if (!this.currentCard?.state) return;
|
||||
const { member } = this.currentCard.state;
|
||||
if (!member) return;
|
||||
const pendingRequest = pendingVerificationRequestForUser(MatrixClientPeg.get(), member);
|
||||
const pendingRequest = pendingVerificationRequestForUser(MatrixClientPeg.safeGet(), member);
|
||||
if (pendingRequest) {
|
||||
this.currentCard.state.verificationRequest = pendingRequest;
|
||||
this.emitAndUpdateSettings();
|
||||
|
||||
Reference in New Issue
Block a user