Skip to content

Commit

Permalink
fix: do not omit crossorigin from link preload (#241)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored Sep 4, 2024
1 parent c66dfdd commit 9e77eec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/composables/useScript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function useScript<T extends Record<symbol | string, any> = Record<symbol
rel,
as: rel === 'preload' ? 'script' : undefined,
href: input.src,
crossorigin: isCrossOrigin ? undefined : (typeof input.crossorigin !== 'undefined' ? input.crossorigin : 'anonymous'),
crossorigin: !isCrossOrigin ? undefined : (typeof input.crossorigin !== 'undefined' ? input.crossorigin : 'anonymous'),
key: `nuxt-script-${id}`,
tagPriority: rel === 'preload' ? 'high' : 0,
fetchpriority: 'low',
Expand Down

0 comments on commit 9e77eec

Please sign in to comment.