We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69d0e47 commit 9740708Copy full SHA for 9740708
src/components/Checkout/CheckoutForm.component.tsx
@@ -59,13 +59,9 @@ const CheckoutForm = () => {
59
// Get cart data query
60
const { data } = useQuery(GET_CART, {
61
notifyOnNetworkStatusChange: true,
62
- onCompleted: () => {
+ onCompleted: (data) => {
63
const updatedCart = getFormattedCart(data) as RootObject | undefined;
64
- if (!updatedCart || !data.cart.contents.nodes.length) {
65
- setCart(null);
66
- return;
67
- }
68
- setCart(updatedCart as RootObject);
+ setCart(updatedCart || null);
69
},
70
});
71
0 commit comments