Skip to content

Commit f8e42a1

Browse files
committed
Don't replace existing style content, only empty
1 parent a022fa9 commit f8e42a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/runtime/internal/dom.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export function get_root_for_style(node: Node): ShadowRoot | Document {
155155
}
156156

157157
export function append_stylesheet(node: ShadowRoot | Document, style: HTMLStyleElement) {
158-
style.textContent = '/* empty */';
158+
style.textContent = style.textContent || '/* empty */';
159159
append((node as Document).head || node, style);
160160
return style.sheet as CSSStyleSheet;
161161
}

0 commit comments

Comments
 (0)