Skip to content

Commit 6216f1c

Browse files
committed
Cleanup code a bit
1 parent 1263c95 commit 6216f1c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/util/formatVariantSelector.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ export function formatVariantSelector(formats, { context, candidate }) {
2323
let prefix = context?.tailwindConfig.prefix ?? ''
2424

2525
// Parse the format selector into an AST
26-
// TODO: Cache the ASTs as a given format will always have the same AST -- we'll have to clone it though if we do that
27-
// The cache should probably go in `context`
2826
let parsedFormats = formats.map((format) => {
2927
let ast = selectorParser().astSync(format.format)
3028

@@ -44,9 +42,7 @@ export function formatVariantSelector(formats, { context, candidate }) {
4442
})
4543

4644
// And iteratively merge each format selector into the candidate selector
47-
for (let format of parsedFormats) {
48-
let ast = format.ast.clone()
49-
45+
for (let { ast } of parsedFormats) {
5046
// 1. Handle :merge() special pseudo-class
5147
;[formatAst, ast] = handleMergePseudo(formatAst, ast)
5248

0 commit comments

Comments
 (0)