Use MatrixClientPeg::safeGet for strict typing (#10989)
This commit is contained in:
parent
d64018ce26
commit
9b5b053148
60 changed files with 225 additions and 203 deletions
|
@ -38,9 +38,9 @@ export default class NotifProvider extends AutocompleteProvider {
|
|||
force = false,
|
||||
limit = -1,
|
||||
): Promise<ICompletion[]> {
|
||||
const client = MatrixClientPeg.get();
|
||||
const client = MatrixClientPeg.safeGet();
|
||||
|
||||
if (!this.room.currentState.mayTriggerNotifOfType("room", client.credentials.userId!)) return [];
|
||||
if (!this.room.currentState.mayTriggerNotifOfType("room", client.getSafeUserId())) return [];
|
||||
|
||||
const { command, range } = this.getCurrentCommand(query, selection, force);
|
||||
if (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue