We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
canonicalizeCandidates
1 parent f6c1e15 commit 196da17Copy full SHA for 196da17
packages/tailwindcss/src/canonicalize-candidates.ts
@@ -8,9 +8,11 @@ import { toKeyPath } from './utils/to-key-path'
8
import * as ValueParser from './value-parser'
9
10
export function canonicalizeCandidates(ds: DesignSystem, candidates: string[]): string[] {
11
- return candidates.map((candidate) => {
12
- return canonicalizeCandidateCache.get(ds).get(candidate)
13
- })
+ let result = new Set<string>()
+ for (let candidate of candidates) {
+ result.add(canonicalizeCandidateCache.get(ds).get(candidate))
14
+ }
15
+ return Array.from(result)
16
}
17
18
const canonicalizeCandidateCache = new DefaultMap((ds: DesignSystem) => {
0 commit comments