fix: make organisation filter case insensitive

This commit is contained in:
Alexander-N 2017-04-23 12:30:19 +02:00
parent 6ea99540ec
commit 01fc6da3b2

View File

@ -84,7 +84,11 @@ export class SideMenuCtrl {
return; return;
} }
if (this.orgItems.length < this.maxShownOrgs && (this.orgFilter === '' || org.name.indexOf(this.orgFilter) !== -1)){ if (this.orgItems.length === this.maxShownOrgs) {
return;
}
if (this.orgFilter === '' || (org.name.toLowerCase().indexOf(this.orgFilter.toLowerCase()) !== -1)) {
this.orgItems.push({ this.orgItems.push({
text: "Switch to " + org.name, text: "Switch to " + org.name,
icon: "fa fa-fw fa-random", icon: "fa fa-fw fa-random",