Skip to content

Commit cb3f28c

Browse files
philipp-spiessadamwathan
authored andcommitted
Fixes
1 parent 9c630e9 commit cb3f28c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/@tailwindcss-upgrade/src/migrate-js-config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,10 +341,10 @@ function removeUnnecessarySpacingKeys(
341341
let [multiplier, unit] = splitNumberAndUnit(value as string)
342342
if (multiplier === null) continue
343343

344-
if (!isValidSpacingMultiplier(multiplier)) continue
344+
if (!isValidSpacingMultiplier(key)) continue
345345
if (unit !== spacingUnit) continue
346346

347-
if (parseFloat(multiplier) === parseFloat(multiplier) * parseFloat(spacingMultiplier)) {
347+
if (parseFloat(multiplier) === Number(key) * parseFloat(spacingMultiplier)) {
348348
delete resolvedConfig.theme.spacing[key]
349349
designSystem.theme.clearNamespace(escape(`--spacing-${key.replaceAll('.', '_')}`), 0)
350350
}

0 commit comments

Comments
 (0)