Skip to content

Commit 61c70d4

Browse files
author
Cem Yılmaz
committed
If arbitrary presents and is not color we were just assign first available plugin to it and hope for the best, but it was wrong. now we check unit type and find associated plugin by type if fails assign the one that's not color.
1 parent eb330d3 commit 61c70d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/parse.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export const parse = (input: string, config?: Config): AST | Error => {
120120
//It's not color, but it's still an arbitrary. We are just going to do parse it
121121
//The result might not be correct, but it's better than nothing and even tailwind will parse it anyway
122122
if(availablePlugins.length > 0){
123-
associatedPluginByType = availablePlugins[0]
123+
associatedPluginByType = availablePlugins.find(x => x.type === unitType) || availablePlugins.find(x => x.type !== "color")
124124
}
125125
}
126126

0 commit comments

Comments
 (0)