We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e12374 commit 3b12c0dCopy full SHA for 3b12c0d
1 file changed
packages/tailwindcss/src/utils/compare.ts
@@ -33,22 +33,15 @@ export function compare(a: string, z: string) {
33
zCode = z.charCodeAt(++zEnd)
34
} while (zCode >= ZERO && zCode <= NINE)
35
36
- if (aValue - zValue) {
37
- return aValue - zValue
38
- }
+ if (aValue - zValue) return aValue - zValue
39
40
let aNumber = a.slice(i, aEnd)
41
let zNumber = z.slice(i, zEnd)
42
43
// Fallback case if numbers are the same but the string representation
44
// is not. Fallback to string sorting. E.g.: `0123` vs `123`
45
- if (aNumber < zNumber) {
46
- return -1
47
- } else if (aNumber > zNumber) {
48
- return 1
49
- } else {
50
- continue
51
+ if (aNumber < zNumber) return -1
+ if (aNumber > zNumber) return 1
52
}
53
54
// Continue if the characters are the same
0 commit comments