Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #360 from matrix-org/dbkr/fix_tabcomplete_order_again
Browse files Browse the repository at this point in the history
Fix tab complete order properly
  • Loading branch information
richvdh committed Jul 21, 2016
2 parents 8d2ac5d + 0b0f10d commit 9565eef
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/TabComplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,12 @@ class TabComplete {
}

if (a.kind == 'member') {
return this.memberTabOrder[b.member.userId] - this.memberTabOrder[a.member.userId];
let orderA = this.memberTabOrder[a.member.userId];
let orderB = this.memberTabOrder[b.member.userId];
if (orderA === undefined) orderA = -1;
if (orderB === undefined) orderB = -1;

return orderB - orderA;
}

// anything else we have no ordering for
Expand Down

0 comments on commit 9565eef

Please sign in to comment.