bejamas / gatsby-plugin-csp

A Gatsby plugin which adds strict Content Security Policy to your project.
MIT License
38 stars 15 forks source link

Add key to remove error #23

Closed Primajin closed 1 year ago

Primajin commented 2 years ago

fixes #13


 ERROR

Warning: Each child in a list should have a unique "key" prop.

Check the top-level render call using <head>. See https://reactjs.org/link/warning-keys for more information.
    at meta
    at HTML (R:\eyesbound\.cache\page-ssr\routes\render-page.js
Primajin commented 2 years ago

Thanks @w3bdesign for approving the changes. Do you think we can merge this soon~ish?

Primajin commented 2 years ago

I am happy helping transforming this from common JS into a module (ESM import vs. CJS require). However this could be considered a breaking change and I highly recommend doing this in a separate PR with a proper plan and discussion 😅

Let's keep the diff of this PR here small as it's sole purpose was fixing the error with the missing key, happy to file other PRs for chore (let vs. const etc.) if applicable.

Primajin commented 1 year ago

Hey @thomkrupa @sweaverdeloitte do you have write access to this repo? This is a pretty small diff and many people are affected by the bug, can we go forward with this? Would be great, thank you!

thomkrupa commented 1 year ago

Thank you @Primajin! Merged. We're planning a bigger update to the plugin soon!

Primajin commented 1 year ago

Sweet, looking forward to. Let me know if you need any support