1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Replace optional chaining with the traditional way

Co-authored-by: Bill Thornton <thornbill@users.noreply.github.com>
This commit is contained in:
Yasin Silavi 2023-05-31 22:03:11 +03:30 committed by GitHub
parent 13786b082d
commit 6e20dff6bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -102,7 +102,7 @@ const UserProfile: FunctionComponent = () => {
const target = evt.target as HTMLInputElement;
const file = (target.files as FileList)[0];
if (!/image.*/.exec(file?.type)) {
if (!file || !/image.*/.exec(file.type)) {
return false;
}