replace for loop with findIndex

This commit is contained in:
Pico
2025-11-14 00:51:07 +03:00
parent 6f61782c8f
commit 86aab5b1fd
@@ -155,12 +155,8 @@ ContentPage {
})] })]
currentIndex: { currentIndex: {
for (let i = 0; i < model.length; i++) { const index = model.findIndex(item => item.value === Config.options.language.ui);
if (model[i].value === Config.options.language.ui) { return index !== -1 ? index : 0;
return i;
}
}
return 0;
} }
onActivated: index => { onActivated: index => {