Skip to content

Commit

Permalink
Merge pull request #415 from adobe/fixSmells
Browse files Browse the repository at this point in the history
fix: smells
  • Loading branch information
marshallpete authored Sep 26, 2024
2 parents 2c695d2 + ef450b0 commit a616f5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/specBuilder/specUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ export const getFacetsFromProps = ({
// filter out the ones that use static values instead of fields
let facets = [color, lineType, opacity, size]
.map((facet) => (Array.isArray(facet) ? facet[0] : facet))
.filter((facet) => typeof facet === 'string') as string[];
.filter((facet) => typeof facet === 'string');
// remove duplicates
facets = [...new Set(facets)];

let secondaryFacets = [color, lineType, opacity]
.map((facet) => (Array.isArray(facet) ? facet[1] : undefined))
.filter((facet) => typeof facet === 'string') as string[];
.filter((facet) => typeof facet === 'string');
// remove duplicates
secondaryFacets = [...new Set(secondaryFacets)];

Expand Down

0 comments on commit a616f5a

Please sign in to comment.