use for-of statements to replace for and for-in

This commit is contained in:
MaysWind
2025-09-09 23:48:42 +08:00
parent c75a902d84
commit 34c5a1750e
50 changed files with 368 additions and 460 deletions
+3 -3
View File
@@ -666,9 +666,9 @@ const allLanguages = computed<LanguageOption[]>(() => getAllLanguageOptions(true
const allCurrencies = computed<LocalizedCurrencyInfo[]>(() => getAllCurrencies());
const currentLanguageName = computed<string>(() => {
for (let i = 0; i < allLanguages.value.length; i++) {
if (allLanguages.value[i].languageTag === newProfile.value.language) {
return allLanguages.value[i].nativeDisplayName;
for (const lang of allLanguages.value) {
if (lang.languageTag === newProfile.value.language) {
return lang.nativeDisplayName;
}
}