Skip to content

Commit 797c5d1

Browse files
committed
fetchPolicy
1 parent 0e73acd commit 797c5d1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

nuxt3/components/Layout/LayoutCart.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ const cartLength = useState('cartLength', () => 0)
4141
const subTotal = useState('subTotal', '')
4242
const remoteError = useState('remoteError', () => false)
4343
44-
const { data, error, pending, execute } = await useAsyncQuery(GET_CART_QUERY)
44+
const { data, error, pending, execute } = await useAsyncQuery(GET_CART_QUERY, {
45+
options: { fetchPolicy: 'cache-and-network' },
46+
})
4547
4648
const updateCartDisplay = () => {
4749
if (data) {

0 commit comments

Comments
 (0)