Skip to content

Commit

Permalink
fix: panic on empty string input is empty (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
Oudwins authored Sep 8, 2024
1 parent e6eb778 commit f4afef0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/twmerge/create-tailwind-merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ func CreateTwMerge(config *TwMergeConfig, cache cache.ICache) TwMergeFn {
var mergeClassList func(classList string) string

merger := func(args ...string) string {
classList := strings.Join(args, " ")
classList := strings.TrimSpace(strings.Join(args, " "))
if classList == "" {
return ""
}
cached := cache.Get(classList)
if cached != "" {
return cached
Expand Down

0 comments on commit f4afef0

Please sign in to comment.