From 6f4150ed2fbfaabbefe0e9b37a4df6815cbeb822 Mon Sep 17 00:00:00 2001 From: Aleksandr Vishniakov Date: Thu, 17 Aug 2023 14:38:18 +0200 Subject: [PATCH] fix: add await for save changes (#694) --- client-app/pages/account/list-details.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client-app/pages/account/list-details.vue b/client-app/pages/account/list-details.vue index 7dcbcc5286..a5a44595c4 100644 --- a/client-app/pages/account/list-details.vue +++ b/client-app/pages/account/list-details.vue @@ -236,8 +236,8 @@ async function updateItems() { await updateItemsInWishlist(payload); } -function openSaveChangesModal(): Promise { - return new Promise((resolve) => { +async function openSaveChangesModal(): Promise { + return await new Promise((resolve) => { const closeDialog = openPopup({ component: VcConfirmationDialog, props: { @@ -245,9 +245,9 @@ function openSaveChangesModal(): Promise { noIcon: true, title: t("pages.account.list_details.save_changes"), text: t("pages.account.list_details.save_changes_message"), - onConfirm: () => { + onConfirm: async () => { closeDialog(); - updateItems(); + await updateItems(); resolve(true); }, onClose: () => {