change order of if or conditions as micro-optimization

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/21833/head
Michael Telatynski 2020-01-30 20:59:30 +00:00
parent b84fd245b1
commit 7e45979e00
1 changed files with 1 additions and 1 deletions

View File

@ -426,7 +426,7 @@ export class PartCreator {
let room;
if (alias[0] === '#') {
room = this._client.getRooms().find((r) => {
return r.getAliases().includes(alias) || r.getCanonicalAlias() === alias;
return r.getCanonicalAlias() === alias || r.getAliases().includes(alias);
});
} else {
room = this._client.getRoom(alias);