Skip to content

Commit

Permalink
Fix handle empty url in profile deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
llunaCreixent authored and mikozet committed Jul 1, 2024
1 parent 3da51ef commit e8ea785
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/ButtonDeleteProfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ const ButtonDeleteProfile = ({ displayEditOption, isOutline, isText }) => {
setIsOpenDialogCloseInfo(false);
try {
const result = await core.user.delete(safe.currentAccount);
await core.avatar.delete(avatarUrl);

if (avatarUrl) {
await core.avatar.delete(avatarUrl);
}
if (result) {
setUseCacheOnRedirect(false);
dispatch(
Expand Down

0 comments on commit e8ea785

Please sign in to comment.