Skip to content

Commit ae64dd3

Browse files
author
Bot
committed
block lang filtering when not admin
1 parent 2a860af commit ae64dd3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/LanguagesList.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ export default {
8383
const filtered = this.languagesList
8484
.filter((language) => language.name.toLowerCase().includes(search))
8585
.sort((a, b) => (b.name.toLowerCase().startsWith(search) ? 1 : -1));
86-
return filtered.length > 0 ? filtered : this.languagesList;
86+
return filtered.length === 0 || (this.room.connected && !this.room.admin) ? this.languagesList : filtered;
8787
}
88-
return [...Array(29)].map(() => ({ name: 'Loading...' }));
88+
return [...Array(33)].map(() => ({ name: '...' }));
8989
},
9090
fillEmptyCellsReference() {
9191
// .bind spawns new reference and will not work with removeEventListener without saving it here

0 commit comments

Comments
 (0)