Skip to content

Commit

Permalink
fix(unhead): handle undefined style attributes (#337)
Browse files Browse the repository at this point in the history
* handle undefined property #336

* remove assigned type
  • Loading branch information
sameignatovich committed Apr 5, 2024
1 parent 3246809 commit 03d60b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/shared/src/normalise.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ export function normaliseStyleClassProps<T extends 'class' | 'style'>(key: T, v:
.map(([k, v]) => key === 'style' ? `${k}:${v}` : k)
}
// finally, check we don't have spaces, we may need to split again
return (Array.isArray(v) ? v.join(sep) : v as string)
.split(sep)
return (Array.isArray(v) ? v.join(sep) : v)
?.split(sep)
.filter(c => c.trim())
.filter(Boolean)
.join(sep)
Expand Down

0 comments on commit 03d60b3

Please sign in to comment.