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
@@ -396,9 +396,9 @@ export function useTransactionEditPageBase(type: TransactionEditPageType, initMo
});
watch(() => transaction.value.timeZone, (newValue) => {
for (let i = 0; i < allTimezones.value.length; i++) {
if (allTimezones.value[i].name === newValue) {
transaction.value.utcOffset = allTimezones.value[i].utcOffsetMinutes;
for (const timezone of allTimezones.value) {
if (timezone.name === newValue) {
transaction.value.utcOffset = timezone.utcOffsetMinutes;
break;
}
}