Skip to content

Commit 970c5d2

Browse files
authored
fix(runtime): update call to prepend to remove null node (#5946)
1 parent 37a0aaf commit 970c5d2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/runtime/styles.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,13 @@ export const addStyle = (styleContainerNode: any, cmpMeta: d.ComponentRuntimeMet
105105
preconnectLinks.length > 0
106106
? preconnectLinks[preconnectLinks.length - 1].nextSibling
107107
: document.querySelector('style');
108-
styleContainerNode.insertBefore(styleElm, referenceNode);
108+
(styleContainerNode as HTMLElement).insertBefore(styleElm, referenceNode);
109109
} else if ('host' in styleContainerNode) {
110110
/**
111111
* if a scoped component is used within a shadow root, we want to insert the styles
112112
* at the beginning of the shadow root node
113113
*/
114-
styleContainerNode.prepend(styleElm, null);
114+
(styleContainerNode as HTMLElement).prepend(styleElm);
115115
}
116116
}
117117

0 commit comments

Comments
 (0)