Skip to content

Conversation

@NemisysT
Copy link

@NemisysT NemisysT commented Oct 7, 2025

Fixes #1457

The variant selector was preventing users from switching between valid product combinations. The issue was in the isAvailableForSale logic which checked if ALL current options plus the new selection formed a valid combination, creating impossible scenarios (e.g., checking for BLACK+L+WHITE when clicking WHITE from BLACK+L).

The fix changes the availability check to only verify if there exists at least one valid variant with the selected option value, regardless of other currently selected options. This allows users to freely switch between any valid combinations.

Example: Users can now switch from BLACK+L to WHITE+M without having to first change to an intermediate size.

Fixes vercel#1457

The variant selector was preventing users from switching between valid product combinations. The issue was in the isAvailableForSale logic which checked if ALL current options plus the new selection formed a valid combination, creating impossible scenarios (e.g., checking for BLACK+L+WHITE when clicking WHITE from BLACK+L).

The fix changes the availability check to only verify if there exists at least one valid variant with the selected option value, regardless of other currently selected options. This allows users to freely switch between any valid combinations.

Example: Users can now switch from BLACK+L to WHITE+M without having to first change to an intermediate size.
@vercel
Copy link

vercel bot commented Oct 7, 2025

@NemisysT is attempting to deploy a commit to the Vercel Solutions Team on Vercel.

A member of the Team first needs to authorize it.

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.

Product page's variant selector prevents switching to another valid combination

1 participant