Skip to content

Commit

Permalink
test: ignore values from variantMap if conditionMap has same key
Browse files Browse the repository at this point in the history
  • Loading branch information
malangcat committed Jan 20, 2025
1 parent a33d3b5 commit 80b6e0d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/stories/components/variant-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ const generateCombinations = (variantMap: VariantMap, conditionMap: ConditionMap
for (const key of keys) {
const values = [
...new Set(
[...(variantMap[key] ?? []), ...Object.keys(conditionMap[key] ?? {})].map(Boolish.asUnion),
[...(conditionMap[key] ? Object.keys(conditionMap[key]) : (variantMap[key] ?? []))].map(
Boolish.asUnion,
),
),
];
const temp: Record<string, string | boolean>[] = [];
Expand Down

0 comments on commit 80b6e0d

Please sign in to comment.