diff --git a/packages/sylius/README.md b/packages/sylius/README.md index f44c35e54..2acf739e8 100644 --- a/packages/sylius/README.md +++ b/packages/sylius/README.md @@ -36,7 +36,7 @@ NEXT_PUBLIC_SYLIUS_API_URL=127.0.1:8000 NEXT_PUBLIC_SYLIUS_ALLOWED_IMAGE_DOMAIN=127.0.0.1 ``` -4. With the Sylius server running, start this project using `yarn dev` or `npm run dev`. +4. With the Sylius server running, start this project using `yarn dev`. ### Known Limitations diff --git a/packages/sylius/src/cart/use-cart.tsx b/packages/sylius/src/cart/use-cart.tsx index aa32265c4..9435c06a1 100644 --- a/packages/sylius/src/cart/use-cart.tsx +++ b/packages/sylius/src/cart/use-cart.tsx @@ -13,9 +13,10 @@ export const handler: SWRHook = { method: 'GET', }, fetcher: async ({ options, fetch }) => { - if (getCartToken()) { + const cartToken = getCartToken() + if (cartToken) { const syliusCart = await fetch({ - url: `${options.url}/${getCartToken()}`, + url: `${options.url}/${cartToken}`, method: options.method, }) return normalizeCart(syliusCart)