Skip to content

Commit

Permalink
fix(runtime): ensure referenceNode is child node of styleContainerNode (
Browse files Browse the repository at this point in the history
  • Loading branch information
tweis authored Sep 24, 2024
1 parent 7dc5acb commit a02bc36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export const addStyle = (styleContainerNode: any, cmpMeta: d.ComponentRuntimeMet
const referenceNode =
preconnectLinks.length > 0
? preconnectLinks[preconnectLinks.length - 1].nextSibling
: document.querySelector('style');
: styleContainerNode.querySelector('style');
(styleContainerNode as HTMLElement).insertBefore(styleElm, referenceNode);
} else if ('host' in styleContainerNode) {
/**
Expand Down

0 comments on commit a02bc36

Please sign in to comment.