change order of if or conditions as micro-optimization

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2020-01-30 20:59:30 +00:00
parent b84fd245b1
commit 7e45979e00

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);