Skip to content

Commit

Permalink
fix(core): early return noop variants
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jul 28, 2023
1 parent e984deb commit 3ab513d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/core/src/generator/index.ts
Expand Up @@ -321,8 +321,11 @@ export class UnoGenerator<Theme extends object = object> {
let handler = await v.match(processed, context)
if (!handler)
continue
if (isString(handler))
if (isString(handler)) {
if (handler === processed)
continue
handler = { matcher: handler }
}
processed = handler.matcher
handlers.unshift(handler)
variants.add(v)
Expand Down

0 comments on commit 3ab513d

Please sign in to comment.