mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 13:14:58 +08:00
Merge pull request #4463 from matrix-org/t3chguy/fix_autocomplete
Fix post-ts autocomplete, it is not null
This commit is contained in:
commit
f2a91e7039
@ -64,7 +64,7 @@ export default class AutocompleteProvider {
|
||||
commandRegex = this.forcedCommandRegex || /\S+/g;
|
||||
}
|
||||
|
||||
if (commandRegex === null) {
|
||||
if (!commandRegex) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user