Closed jlengstorf closed 5 years ago
How is the cart data returned now? I did something similar on another website last week, although not using gatsby should be pretty similar process. Happy to have a look
We create a Shopify checkout, then store its ID in localStorage. I think the fix here is to add a try/catch that just swallows a checkout error and creates a new checkout in this code: https://github.com/gatsbyjs/store.gatsbyjs.org/blob/625b0299f625303ad610d22611f9d878e8f50cfa/src/components/shared/Layout.js#L125-L133
Thanks, @isaac-martin!
@jlengstorf and @isaac-martin I have just made the #202 to fix that :)
Closed in #202
If I add something to my cart, then leave the site, and that item sells out/gets removed before I come back, the cart comes back empty and the site completely fails to load. We need to add a check for a bad response when loading the saved cart and — if we can't load it — delete it entirely rather than borking the site.