mirror of
https://github.com/fergalmoran/supanextail.git
synced 2025-12-22 09:17:54 +00:00
Fix null type issue
This commit is contained in:
@@ -33,8 +33,10 @@ const Avatar = ({ url, size, onUpload }: AvatarProps): JSX.Element => {
|
||||
if (error) {
|
||||
throw error;
|
||||
}
|
||||
if (data) {
|
||||
const url = URL.createObjectURL(data);
|
||||
setAvatarUrl(url);
|
||||
}
|
||||
} catch (error: unknown) {
|
||||
if (error instanceof Error) {
|
||||
console.log('Error downloading image: ', error.message);
|
||||
|
||||
Reference in New Issue
Block a user