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

fix(client/public): avoid global variable #9619

Merged
merged 1 commit into from
Sep 6, 2023
Merged

fix(client/public): avoid global variable #9619

merged 1 commit into from
Sep 6, 2023

Conversation

mtrucc
Copy link
Contributor

@mtrucc mtrucc commented Sep 6, 2023

Summary

Fixes #9597

Problem

Unreasonable global variables 'c'

Solution

const c = { light: "#ffffff", dark: "#1b1b1b" };

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

let a = 1
let b = 2
let c = 3

No error reported

@mtrucc
Copy link
Contributor Author

mtrucc commented Sep 6, 2023

#9598
The PR contained in contains 2 unverified commits
Do a fork and commit again

@caugner caugner merged commit 47c26df into mdn:main Sep 6, 2023
8 checks passed
@caugner
Copy link
Contributor

caugner commented Sep 6, 2023

Thank you @mtrucc! 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unreasonable global variables
2 participants