Skip to content

Commit 1e16f41

Browse files
committed
fix(useScript): allow custom head instance
1 parent 9ff6c10 commit 1e16f41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/vue/src/composables/useScript.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ export type UseScriptContext<T extends Record<symbol | string, any>> =
3535

3636
export function useScript<T extends Record<symbol | string, any> = Record<symbol | string, any>, U = Record<symbol | string, any>>(_input: UseScriptInput, _options?: UseScriptOptions<T, U>): UseScriptContext<UseFunctionType<UseScriptOptions<T, U>, T>> {
3737
const input = (typeof _input === 'string' ? { src: _input } : _input) as UseScriptResolvedInput
38-
const head = injectHead()
3938
const options = _options || {}
39+
const head = options.head || injectHead()
4040
// @ts-expect-error untyped
4141
options.head = head
4242
options.eventContext = getCurrentInstance()

0 commit comments

Comments
 (0)