You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've not been able to capture a screenshot yet as it fades out quickly, but after placing an order, I'm seeing an empty cart message being shown in the bottom left corner of the screen on the order confirmation page.
The text was updated successfully, but these errors were encountered:
spencern
added
the
bug
For issues that describe a defect or regression in the released software
label
Sep 21, 2018
I've seen this, too. @willopez I don't have time to investigate further, but I suspect this is due to the refetchCart call you added in https://github.com/reactioncommerce/reaction-next-starterkit/pull/314/files. What probably happens is that sometimes it refetches before the cart is deleted and sometimes after. Also, I think it calls the Query callback again after the fetch, which might trigger Mobx to think it should open the mini cart.
Rather than refetch, can you just force Apollo to remove the cart from the cache by its ID? Don't even fetch from the server again, just force delete it from the client in the same place where you call cartStore.clearAnonymousCartCredentials(). Have to check Apollo docs to see if that's possible.
@aldeed That might be the cause, I'll investigate. And it is possible to clear the cache for a query without refetching from that server. I'll give that a try.
I've not been able to capture a screenshot yet as it fades out quickly, but after placing an order, I'm seeing an empty cart message being shown in the bottom left corner of the screen on the order confirmation page.
The text was updated successfully, but these errors were encountered: