mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-16 07:57:33 +08:00
use for-of statements to replace for and for-in
This commit is contained in:
@@ -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 = '';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user