Improved language search

This commit is contained in:
Ayush Kumar 2021-01-17 15:18:17 +05:30
parent 48a3154ab6
commit 3c199d8c78

View File

@ -24,7 +24,7 @@ import SettingsStore from "../../../settings/SettingsStore";
import { _t } from "../../../languageHandler"; import { _t } from "../../../languageHandler";
function languageMatchesSearchQuery(query, language) { function languageMatchesSearchQuery(query, language) {
if (language.label.toUpperCase().includes(query.toUpperCase())) return true; if (language.label.toUpperCase().startsWith(query.toUpperCase())) return true;
if (language.value.toUpperCase() === query.toUpperCase()) return true; if (language.value.toUpperCase() === query.toUpperCase()) return true;
return false; return false;
} }