Skip to content

Commit

Permalink
Merge pull request #10994 from hassnian/fix/issue-listing-cart-modal-…
Browse files Browse the repository at this point in the history
…animation

fix: Listing cart cleared before modal is fully closed
  • Loading branch information
vikiival authored Sep 17, 2024
2 parents 2cf6a14 + d743f31 commit d4b47eb
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions composables/useListingCartModal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,10 @@ export default ({
})

if (clearItemsOnModalClose) {
watch(
() => preferencesStore.listingCartModalOpen,
(isOpen, wasOpen) => {
if (!isOpen && wasOpen) {
clearItemsInChain()
}
},
)
useModalIsOpenTracker({
isOpen: computed(() => preferencesStore.listingCartModalOpen),
onChange: clearItemsInChain,
})
}

return {
Expand Down

0 comments on commit d4b47eb

Please sign in to comment.