-
Notifications
You must be signed in to change notification settings - Fork 89
Closed
Description
Describe the Bug
using magento 2.4.5 generate the error:
node_modules/@graphcommerce/google-datalayer/mapping/cartToPurchase/cartToPurchase.ts:23:32 - error TS18049: 'address.selected_shipping_method.price_excl_tax' is possibly 'null' or 'undefined'.
23 (sum, address) => sum + (address?.selected_shipping_method?.price_excl_tax.value ?? 0),
Expected Behavior
price_excl_tax is optional
To Reproduce
in the magento-open-source examplet use:
`// @ts-check
/**
- Docs: https://graphcommerce.org/docs/framework/config
- @type {import('@graphcommerce/next-config/src/generated/config').GraphCommerceConfig}
*/
const config = {
magentoEndpoint: 'https://configurator.reachdigital.dev/graphql',
magentoVersion: 245,
canonicalBaseUrl: 'https://graphcommerce.vercel.app',
storefront: [
{ locale: 'en', magentoStoreCode: 'en_US', defaultLocale: true },
{ locale: 'nl', magentoStoreCode: 'nl_NL' },
],
recentlyViewedProducts: {
enabled: true,
},
}
module.exports = config
`
as graphcommerce.config.js
Metadata
Metadata
Assignees
Labels
No labels