Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
sortedSupportedLanguages() {
const selectedLanguage = I18n.language || window.localStorage.i18nextLng;
let selectedLngPosition = this.supportedLanguages.indexOf(selectedLanguage);
if(selectedLngPosition < 0) {
selectedLngPosition = 0;
}
return this.array_move(this.supportedLanguages, selectedLngPosition, 0);
}