From 3c05d6ebcde7bd13a1df56a2d09612d9ef53591f Mon Sep 17 00:00:00 2001 From: Indranil Mukherjee Date: Fri, 26 Feb 2021 18:37:10 +0530 Subject: [PATCH] Update asyncActions.js The cart context should get the details if any error occurs --- packages/peregrine/lib/store/actions/cart/asyncActions.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/peregrine/lib/store/actions/cart/asyncActions.js b/packages/peregrine/lib/store/actions/cart/asyncActions.js index 88abe5c5fa..4915e902d0 100644 --- a/packages/peregrine/lib/store/actions/cart/asyncActions.js +++ b/packages/peregrine/lib/store/actions/cart/asyncActions.js @@ -347,10 +347,11 @@ export const getCartDetails = payload => { try { const { data } = await fetchCartDetails({ variables: { cartId }, - fetchPolicy: 'network-only' + fetchPolicy: 'no-cache', + errorPolicy: 'all' }); const { cart: details } = data; - + details.items = details.items.filter(function (e) {return e != null;}); dispatch(actions.getDetails.receive({ details })); } catch (error) { dispatch(actions.getDetails.receive(error));