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
@@ -536,11 +536,11 @@ function updateAvatar(event: Event): void {
const el = event.target as HTMLInputElement;
if (!el.files || !el.files.length) {
if (!el.files || !el.files.length || !el.files[0]) {
return;
}
const avatarFile = el.files[0];
const avatarFile = el.files[0] as File;
el.value = '';