Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Apr 18, 2024
1 parent 548fe1e commit 2cae065
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/core/src/generator/index.ts
Expand Up @@ -186,14 +186,14 @@ export class UnoGenerator<Theme extends object = object> {
generator: this,
theme: this.config.theme,
}
this.config.safelist.forEach((s) => {
// We don't want to increment count if token is already in the set
toArray(typeof s === 'function' ? s(safelistContext) : s)
.forEach((s) => {
if (!tokens.has(s))
tokens.add(s)
})
})

this.config.safelist
.flatMap(s => typeof s === 'function' ? s(safelistContext) : s)
.forEach((s) => {
// We don't want to increment count if token is already in the set
if (!tokens.has(s))
tokens.add(s)
})
}

const nl = minify ? '' : '\n'
Expand Down

0 comments on commit 2cae065

Please sign in to comment.