Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type error with magento 2.4.5 #2483

Open
sanvisimo opened this issue Jan 20, 2025 · 0 comments
Open

Type error with magento 2.4.5 #2483

sanvisimo opened this issue Jan 20, 2025 · 0 comments

Comments

@sanvisimo
Copy link

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

/**

module.exports = config
`
as graphcommerce.config.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant