-
Notifications
You must be signed in to change notification settings - Fork 504
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
fix(client/public): avoid global variable #9598
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd leave the variable as-is, but instead wrap the whole contents of the script tag in an IIFE
You also need to update the CSP hash as explained in the comment at the top of the script
Thanks for the tip
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, LGTM! 🙌
@mtrucc Please have a look at the failing "Commit signatures" check:
|
I'm so sorry I didn't notice this |
@mtrucc It looks like you just ran Can you please run |
The command has been executed. Please try it again. Thanks. |
This pull request has merge conflicts that must be resolved before it can be merged. |
The PR contained in contains 2 unverified commits |
Summary
Fixes #9597
Problem
Unreasonable global variables 'c'
Solution
yari/client/public/index.html
Line 112 in 231d6aa
Replace the global variable named 'c' to 'themeConfig'
Screenshots
Before
After
How did you test this change?
Open developer tools
Enter the following command in the console
No error reported