fix(client): scripts loading out of order when added through head (#2970)

pull/2972/head
Divyansh Singh 1 year ago committed by GitHub
parent 2a34c6b307
commit 98679c9e82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -61,6 +61,10 @@ function createHeadElement([tag, attrs, innerHTML]: HeadConfig) {
if (innerHTML) { if (innerHTML) {
el.innerHTML = 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 return el
} }

Loading…
Cancel
Save