Merge pull request #4463 from matrix-org/t3chguy/fix_autocomplete

Fix post-ts autocomplete, it is not null
This commit is contained in:
Michael Telatynski 2020-04-22 13:29:17 +01:00 committed by GitHub
commit f2a91e7039
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -64,7 +64,7 @@ export default class AutocompleteProvider {
commandRegex = this.forcedCommandRegex || /\S+/g;
}
if (commandRegex === null) {
if (!commandRegex) {
return null;
}

View File

@ -102,7 +102,7 @@ export default class UserProvider extends AutocompleteProvider {
const MemberAvatar = sdk.getComponent('views.avatars.MemberAvatar');
// lazy-load user list into matcher
if (this.users === null) this._makeUsers();
if (!this.users) this._makeUsers();
let completions = [];
const {command, range} = this.getCurrentCommand(rawQuery, selection, force);
@ -158,7 +158,7 @@ export default class UserProvider extends AutocompleteProvider {
}
onUserSpoke(user: RoomMember) {
if (this.users === null) return;
if (!this.users) return;
if (!user) return;
if (user.userId === MatrixClientPeg.get().credentials.userId) return;