From 7e45979e00904d039d002a1f598bfa81cc548b30 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 30 Jan 2020 20:59:30 +0000 Subject: [PATCH] change order of if or conditions as micro-optimization Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/editor/parts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/editor/parts.js b/src/editor/parts.js index cb801740d4..652342405f 100644 --- a/src/editor/parts.js +++ b/src/editor/parts.js @@ -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);