Skip to content

Commit

Permalink
fix(config): prevent class merge of avatar size
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamincanac committed Dec 15, 2023
1 parent 0c8ab9d commit b22bd70
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/runtime/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ const customTwMerge = extendTailwindMerge<string, string>({
})

const defuTwMerge = createDefu((obj, key, value, namespace) => {
if (namespace !== 'default' && !namespace.startsWith('default.') && typeof obj[key] === 'string' && typeof value === 'string' && obj[key] && value) {
if (namespace === 'default' || namespace.startsWith('default.')) {
return false
}
if (namespace.endsWith('avatar') && key === 'size') {
return false
}
if (typeof obj[key] === 'string' && typeof value === 'string' && obj[key] && value) {
// @ts-ignore
obj[key] = customTwMerge(obj[key], value)
return true
Expand Down

1 comment on commit b22bd70

@vercel
Copy link

@vercel vercel bot commented on b22bd70 Dec 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ui – ./

ui-git-dev-nuxt-js.vercel.app
ui.nuxt.com
ui-nuxt-js.vercel.app

Please sign in to comment.