fix: avoid log error when cancelling (#5477)

This commit is contained in:
Reinaldo Neto 2024-01-15 13:23:01 -03:00 committed by GitHub
parent 9109b87269
commit 48c7dade1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -146,8 +146,10 @@ const ChangeAvatarView = () => {
type: AvatarStateActions.CHANGE_AVATAR,
payload: { url: response.path, data: `data:image/jpeg;base64,${response.data}`, service: 'upload' }
});
} catch (error) {
log(error);
} catch (error: any) {
if(error?.code !== "E_PICKER_CANCELLED") {
log(error);
}
}
};