diff --git a/src/components/Dialogs/PopupPersonalNew.vue b/src/components/Dialogs/PopupPersonalNew.vue index e1cce5bf9..a917080ea 100644 --- a/src/components/Dialogs/PopupPersonalNew.vue +++ b/src/components/Dialogs/PopupPersonalNew.vue @@ -116,6 +116,8 @@ async function fetchInformation(id: string) { avatar.position = data.position ? data.position : "-"; if (data.avatarName) { fetchProfile(data.id as string, data.avatarName); + } else { + avatar.avatar = ""; } }) .catch((err) => { @@ -199,7 +201,7 @@ async function fetchProfile(id: string, avatarName: string) { await http .get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, avatarName)) .then(async (res) => { - avatar.avatar = res.data.downloadUrl; + avatar.avatar = await res.data.downloadUrl; }) .finally(() => { hideLoader();