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:
parent
13786b082d
commit
6e20dff6bf
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue