Skip to content
This repository was archived by the owner on Aug 16, 2022. It is now read-only.

move head declaration #87

Merged
merged 1 commit into from
May 11, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/assembler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ export function assembleFromSource(

// language=JavaScript
const inlineCreateInjector = `function __vue_create_injector__() {
const head = document.head || document.getElementsByTagName('head')[0]
const styles = __vue_create_injector__.styles || (__vue_create_injector__.styles = {})
const isOldIE =
typeof navigator !== 'undefined' &&
Expand Down Expand Up @@ -122,6 +121,7 @@ export function assembleFromSource(
}

if (!style.element) {
const head = document.head || document.getElementsByTagName('head')[0]
const el = style.element = document.createElement('style')
el.type = 'text/css'

Expand Down