Skip to content

Commit

Permalink
fix(useStyleTag): allow use of existing node
Browse files Browse the repository at this point in the history
  • Loading branch information
jameswragg committed Nov 14, 2022
1 parent 1d8413d commit d73c04a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/core/useStyleTag/index.ts
Expand Up @@ -76,7 +76,9 @@ export function useStyleTag(
el.id = id
if (options.media)
el.media = options.media
document.head.appendChild(el)

if(!el.isConnected)
document.head.appendChild(el)

if (isLoaded.value)
return
Expand Down

0 comments on commit d73c04a

Please sign in to comment.