mirror of https://github.com/vector-im/riot-web
Merge pull request #4463 from matrix-org/t3chguy/fix_autocomplete
Fix post-ts autocomplete, it is not nullpull/21833/head
commit
f2a91e7039
|
@ -64,7 +64,7 @@ export default class AutocompleteProvider {
|
||||||
commandRegex = this.forcedCommandRegex || /\S+/g;
|
commandRegex = this.forcedCommandRegex || /\S+/g;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (commandRegex === null) {
|
if (!commandRegex) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -102,7 +102,7 @@ export default class UserProvider extends AutocompleteProvider {
|
||||||
const MemberAvatar = sdk.getComponent('views.avatars.MemberAvatar');
|
const MemberAvatar = sdk.getComponent('views.avatars.MemberAvatar');
|
||||||
|
|
||||||
// lazy-load user list into matcher
|
// lazy-load user list into matcher
|
||||||
if (this.users === null) this._makeUsers();
|
if (!this.users) this._makeUsers();
|
||||||
|
|
||||||
let completions = [];
|
let completions = [];
|
||||||
const {command, range} = this.getCurrentCommand(rawQuery, selection, force);
|
const {command, range} = this.getCurrentCommand(rawQuery, selection, force);
|
||||||
|
@ -158,7 +158,7 @@ export default class UserProvider extends AutocompleteProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
onUserSpoke(user: RoomMember) {
|
onUserSpoke(user: RoomMember) {
|
||||||
if (this.users === null) return;
|
if (!this.users) return;
|
||||||
if (!user) return;
|
if (!user) return;
|
||||||
if (user.userId === MatrixClientPeg.get().credentials.userId) return;
|
if (user.userId === MatrixClientPeg.get().credentials.userId) return;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue