Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Registry scripts scriptInput shows a type error when trying to disable crossorigin or referrerpolicy #305

Open
Ingramz opened this issue Oct 16, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Ingramz
Copy link

Ingramz commented Oct 16, 2024

🐛 The bug

While investigating a regression in GTM possibly caused by script attribute defaults, I noticed that disabling crossorigin and referrerpolicy results in type errors being displayed.

useScriptGoogleTagManager({
  id: 'GTM-123456',
  scriptInput: {
    async: true,
    defer: false,
    crossorigin: false, // type error
    referrerpolicy: false, // type error
  },
})

This seems be apply universally to all registry scripts.

🛠️ To reproduce

N/A

🌈 Expected behavior

Registry scripts scriptInput should accept falsy values the same way as in useScript.

ℹ️ Additional context

No response

@Ingramz Ingramz added the bug Something isn't working label Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant