Skip to content

Commit

Permalink
fix: empty style causing error
Browse files Browse the repository at this point in the history
Fixes #324
  • Loading branch information
harlan-zw committed Mar 8, 2024
1 parent 9670536 commit 78219cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/dom/src/renderDOMHead.ts
Expand Up @@ -103,7 +103,7 @@ export async function renderDOMHead<T extends Unhead<any>>(head: T, options: Ren
}
else if (k === 'style') {
// style attributes have their own side effects to allow for merging
for (const c of value.split(';').filter(Boolean)) {
for (const c of (value || '').split(';').filter(Boolean)) {
const [k, v] = c.split(':').map(s => s.trim())
track(id, `${ck}:${c}:${k}`, () => {
($el as any as ElementCSSInlineStyle).style.removeProperty(k)
Expand Down

0 comments on commit 78219cb

Please sign in to comment.