Skip to content

Conversation

@yuskithedeveloper
Copy link
Contributor

@yuskithedeveloper yuskithedeveloper commented Oct 22, 2025

@yuskithedeveloper yuskithedeveloper marked this pull request as ready for review October 23, 2025 13:32
@yuskithedeveloper yuskithedeveloper requested a review from a team as a code owner October 23, 2025 13:32
@yuskithedeveloper yuskithedeveloper requested review from Andrew-Orlov, goldenmaya, ivan-kalachikov and muller39 and removed request for a team October 23, 2025 13:32
@cursor
Copy link

cursor bot commented Oct 23, 2025

Bug: Mismatched Object in Configurability Check

The condition checks product.isConfigurable but passes variationResult to the component. This is logically inconsistent because the decision to use AddToCart vs AddToCartSimple is based on the main product's configurability, but the component receives a different object (variationResult). The condition should check variationResult.isConfigurable instead since that's the object being passed to the component. The same pattern exists on lines 114-124 for the main product case, but that one is correct since both the condition and the prop use the same product object.

Fix in Cursor Fix in Web

@cursor
Copy link

cursor bot commented Oct 23, 2025

Bug: Component Selection Mismatch with Variations

Inconsistent logic in dynamic component selection. The component type is determined by product.isConfigurable but the product data passed to the component is variationResult. This creates a mismatch where the component selection is based on the main product's configuration status, but a variation with potentially different configuration status is passed as props. This could result in using the wrong component type (AddToCart vs AddToCartSimple) for the actual variation being rendered.

Fix in Cursor Fix in Web

cursor[bot]

This comment was marked as outdated.

@sonarqubecloud
Copy link

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

Successfully merging this pull request may close these issues.

2 participants