Skip to content

Commit

Permalink
fix: add await for save changes (#694)
Browse files Browse the repository at this point in the history
  • Loading branch information
asvishnyakov authored Aug 17, 2023
1 parent 0b98dff commit 6f4150e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions client-app/pages/account/list-details.vue
Original file line number Diff line number Diff line change
Expand Up @@ -236,18 +236,18 @@ async function updateItems() {
await updateItemsInWishlist(payload);
}
function openSaveChangesModal(): Promise<boolean> {
return new Promise<boolean>((resolve) => {
async function openSaveChangesModal(): Promise<boolean> {
return await new Promise<boolean>((resolve) => {
const closeDialog = openPopup({
component: VcConfirmationDialog,
props: {
variant: "info",
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: () => {
Expand Down

0 comments on commit 6f4150e

Please sign in to comment.