diff --git a/apps/web/components/OrderSummary/__tests__/ContactInformation.spec.ts b/apps/web/components/OrderSummary/__tests__/ContactInformation.spec.ts index 888fb75c9..0f10c8229 100644 --- a/apps/web/components/OrderSummary/__tests__/ContactInformation.spec.ts +++ b/apps/web/components/OrderSummary/__tests__/ContactInformation.spec.ts @@ -41,7 +41,7 @@ const cart: Cart = { "subAmount": 1, "isExportDelivery": true, "shopCountryId": 1, - "itemWishListIds": [], + "itemWishListIds": {}, "items": [ { "id": 1, diff --git a/apps/web/composables/useCustomer/useCustomer.ts b/apps/web/composables/useCustomer/useCustomer.ts index 478b885cd..2d4ff6b93 100644 --- a/apps/web/composables/useCustomer/useCustomer.ts +++ b/apps/web/composables/useCustomer/useCustomer.ts @@ -63,7 +63,7 @@ export const useCustomer: UseCustomerReturn = () => { useHandleError(error.value); state.value.data = data?.value?.data ?? state.value.data; checkUserState(); - useWishlist().setWishlistItemIds(state.value.data?.basket?.itemWishListIds || []); + useWishlist().setWishlistItemIds(Object.keys(state.value.data?.basket?.itemWishListIds || [])); state.value.loading = false; return state.value.data; diff --git a/apps/web/composables/useInitialSetup/useInitialSetup.ts b/apps/web/composables/useInitialSetup/useInitialSetup.ts index bbebd23ad..96ab68b53 100644 --- a/apps/web/composables/useInitialSetup/useInitialSetup.ts +++ b/apps/web/composables/useInitialSetup/useInitialSetup.ts @@ -51,7 +51,7 @@ const setInitialDataSSR: SetInitialData = async () => { setUser(data.value.data.session as SessionResult); setCart(data.value.data.session?.basket as Cart); setCategoryTree(data.value.data.categories); - setWishlistItemIds(data.value.data.session?.basket?.itemWishListIds || []); + setWishlistItemIds(Object.keys(data.value.data.session?.basket?.itemWishListIds || [])); } } catch (error) { useHandleError(error as ApiError); diff --git a/package.json b/package.json index 15023ad63..9c2820ad2 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "lhci:desktop": "lhci collect --config=lighthouserc.desktop.json && lhci assert" }, "dependencies": { - "@plentymarkets/shop-api": "^0.86.0", + "@plentymarkets/shop-api": "^0.87.1", "@types/applepayjs": "^14.0.8", "@types/drift-zoom": "^1.5.2", "@types/googlepay": "^0.7.6", diff --git a/yarn.lock b/yarn.lock index e97df9b7b..94e916e73 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4997,7 +4997,7 @@ __metadata: "@nuxt/test-utils": "npm:^3.13.1" "@nuxtjs/turnstile": "npm:^0.8.0" "@paypal/paypal-js": "npm:8.1.0" - "@plentymarkets/shop-api": "npm:^0.86.0" + "@plentymarkets/shop-api": "npm:^0.87.1" "@types/applepayjs": "npm:^14.0.8" "@types/drift-zoom": "npm:^1.5.2" "@types/googlepay": "npm:^0.7.6" @@ -5031,14 +5031,14 @@ __metadata: languageName: unknown linkType: soft -"@plentymarkets/shop-api@npm:^0.86.0": - version: 0.86.0 - resolution: "@plentymarkets/shop-api@npm:0.86.0::__archiveUrl=https%3A%2F%2Fnpm.pkg.github.com%2Fdownload%2F%40plentymarkets%2Fshop-api%2F0.86.0%2F5bd99dc104eb1b5744354d59ccc603dc573d4446" +"@plentymarkets/shop-api@npm:^0.87.1": + version: 0.87.1 + resolution: "@plentymarkets/shop-api@npm:0.87.1::__archiveUrl=https%3A%2F%2Fnpm.pkg.github.com%2Fdownload%2F%40plentymarkets%2Fshop-api%2F0.87.1%2F3710acc6e809530b16348dd17edb6518016a18b8" dependencies: "@vue-storefront/middleware": "npm:^5.3.2" axios: "npm:^1.7.7" consola: "npm:^3.2.3" - checksum: 10c0/1ddbc8aef54221e8793e16e84903c518a67b61b06140b2404c5cfa637356bd395ef0b4874b00190196725e9c897ba762fe6d126a33c4627994e17b10817c14dc + checksum: 10c0/e939be4e335c28cb5f2f26cda5b968a70a05466583f41d3f6a9af862915680ca4dcbdf6e96a879fdbc97cd4e5141b6fe84ab115ab66dc259d28c1bda55d767e2 languageName: node linkType: hard