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

[BUG] Order history - Error when small image is not set #2158

Open
LucasReyre opened this issue Dec 4, 2024 · 1 comment
Open

[BUG] Order history - Error when small image is not set #2158

LucasReyre opened this issue Dec 4, 2024 · 1 comment

Comments

@LucasReyre
Copy link

Summary

When there is no image in the resolution "small" available for a product, the order history page throws an error.

Steps To Reproduce

Delete the "small" image resolution of a product present in an order.
Navigate to the account/orders page.

Expected result

I expected to see a skeleton or placeholder for the image.

Actual result

The page throws an error.

System Information (as applicable)

"name": "@salesforce/retail-react-app",
"version": "5.0.0",

Additional information

The error seems to come from the order-history.jsx component.

const images = products?.map((product) => { return product?.imageGroups?.find((group) => group.viewType === 'small').images[0] })

Screenshot of the error:

image

@saksham-malhotra-27
Copy link

Hey ! Can I work on this ?

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

2 participants