Skip to content

Commit de9b5a9

Browse files
committed
Remove duplicate variant + value pairs from completions
1 parent 2c866ce commit de9b5a9

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

packages/tailwindcss-language-service/src/completionProvider.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,12 @@ export function completionsFromClassList(
169169
continue
170170
}
171171

172+
if (seenVariants.has(variant.name)) {
173+
continue
174+
}
175+
176+
seenVariants.add(variant.name)
177+
172178
if (variant.isArbitrary) {
173179
items.push(
174180
variantItem({
@@ -229,6 +235,12 @@ export function completionsFromClassList(
229235
continue
230236
}
231237

238+
if (seenVariants.has(`${variant.name}-${value}`)) {
239+
continue
240+
}
241+
242+
seenVariants.add(`${variant.name}-${value}`)
243+
232244
items.push(
233245
variantItem({
234246
label:

0 commit comments

Comments
 (0)