From e8ea78553873a41bc996b1fd35d185a2d193c152 Mon Sep 17 00:00:00 2001 From: llunaCreixent Date: Wed, 19 Jun 2024 10:48:41 +0200 Subject: [PATCH] Fix handle empty url in profile deletion --- src/components/ButtonDeleteProfile.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/ButtonDeleteProfile.js b/src/components/ButtonDeleteProfile.js index 05c9a34e..8742ddd7 100644 --- a/src/components/ButtonDeleteProfile.js +++ b/src/components/ButtonDeleteProfile.js @@ -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(