Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix variant selector to allow switching between valid combinations#1495

Open
NemisysT wants to merge 1 commit intovercel:main from
NemisysT:fix/variant-selector-combination-issue-1457
Open

Fix variant selector to allow switching between valid combinations #1495
NemisysT wants to merge 1 commit intovercel:main from
NemisysT:fix/variant-selector-combination-issue-1457

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.
Copy link
Contributor

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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

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

1 participant

Comments

AltStyle によって変換されたページ (->オリジナル) /