Skip to content
This repository was archived by the owner on Apr 6, 2021. It is now read-only.

Commit b2e0840

Browse files
committed
Refactor
1 parent 3e3c101 commit b2e0840

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib/generateRules.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ function generateRules(candidates, context) {
274274
}
275275

276276
if (context.classCache.has(candidate)) {
277-
allRules.push(context.classCache.get(candidate))
277+
allRules.push(...context.classCache.get(candidate))
278278
continue
279279
}
280280

@@ -286,10 +286,10 @@ function generateRules(candidates, context) {
286286
}
287287

288288
context.classCache.set(candidate, matches)
289-
allRules.push(matches)
289+
allRules.push(...matches)
290290
}
291291

292-
return allRules.flat(1).map(([{ sort, layer, options }, rule]) => {
292+
return allRules.map(([{ sort, layer, options }, rule]) => {
293293
if (options.respectImportant) {
294294
if (context.tailwindConfig.important === true) {
295295
rule.walkDecls((d) => {

0 commit comments

Comments
 (0)