Skip to content

Commit 32318d3

Browse files
committed
fix typo
1 parent c5dfc3a commit 32318d3

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

packages/tailwindcss/src/compile.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import type { Variants } from './variants'
88
export function compileCandidates(
99
rawCandidates: Iterable<string>,
1010
designSystem: DesignSystem,
11-
{ onInvalidCanidate }: { onInvalidCanidate?: (candidate: string) => void } = {},
11+
{ onInvalidCandidate }: { onInvalidCandidate?: (candidate: string) => void } = {},
1212
) {
1313
let nodeSorting = new Map<
1414
AstNode,
@@ -21,7 +21,7 @@ export function compileCandidates(
2121
for (let rawCandidate of rawCandidates) {
2222
let candidate = designSystem.parseCandidate(rawCandidate)
2323
if (candidate === null) {
24-
onInvalidCanidate?.(rawCandidate)
24+
onInvalidCandidate?.(rawCandidate)
2525
continue // Bail, invalid candidate
2626
}
2727
candidates.set(candidate, rawCandidate)
@@ -36,7 +36,7 @@ export function compileCandidates(
3636
next: for (let [candidate, rawCandidate] of candidates) {
3737
let astNode = designSystem.compileAstNodes(rawCandidate)
3838
if (astNode === null) {
39-
onInvalidCanidate?.(rawCandidate)
39+
onInvalidCandidate?.(rawCandidate)
4040
continue next
4141
}
4242

packages/tailwindcss/src/index.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export function compile(css: string): {
1717

1818
// Track all invalid candidates
1919
let invalidCandidates = new Set<string>()
20-
function onInvalidCanidate(candidate: string) {
20+
function onInvalidCandidate(candidate: string) {
2121
invalidCandidates.add(candidate)
2222
}
2323

@@ -133,7 +133,7 @@ export function compile(css: string): {
133133
{
134134
// Parse the candidates to an AST that we can replace the `@apply` rule with.
135135
let candidateAst = compileCandidates(candidates, designSystem, {
136-
onInvalidCanidate: (candidate) => {
136+
onInvalidCandidate: (candidate) => {
137137
throw new Error(`Cannot apply unknown utility class: ${candidate}`)
138138
},
139139
}).astNodes
@@ -203,7 +203,7 @@ export function compile(css: string): {
203203

204204
if (tailwindUtilitiesNode) {
205205
let newNodes = compileCandidates(allValidCandidates, designSystem, {
206-
onInvalidCanidate,
206+
onInvalidCandidate,
207207
}).astNodes
208208

209209
// If no new ast nodes were generated, then we can return the original

0 commit comments

Comments
 (0)