Skip to content

Commit

Permalink
fix: do not omit crossorigin from link preload
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Sep 4, 2024
1 parent c66dfdd commit a3fa01a
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 a3fa01a

Please sign in to comment.