Skip to content

Commit

Permalink
fix(client): scripts loading out of order when added through head (#2970
Browse files Browse the repository at this point in the history
)
  • Loading branch information
brc-dd committed Sep 15, 2023
1 parent 2a34c6b commit 98679c9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/client/app/composables/head.ts
Expand Up @@ -61,6 +61,10 @@ function createHeadElement([tag, attrs, innerHTML]: HeadConfig) {
if (innerHTML) {
el.innerHTML = innerHTML
}
if (tag === 'script' && !attrs.async) {
// async is true by default for dynamically created scripts
;(el as HTMLScriptElement).async = false
}
return el
}

Expand Down

0 comments on commit 98679c9

Please sign in to comment.