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: Simplified level assignment logic in BrowserConsole #7329

Open
wants to merge 1 commit into
base: unstable
Choose a base branch
from

Conversation

brawncode
Copy link

Description

I’ve updated the logic in the BrowserConsole function that handles the level property. Previously, there was a redundant check for opts in the conditional expression. Since we are already checking for the existence of opts?.level, it's unnecessary to verify opts again.

I’ve simplified the assignment to use the nullish coalescing operator (??), which directly assigns the value of opts.level if it exists, or defaults to "info" if it doesn't ;)

@brawncode brawncode requested a review from a team as a code owner December 22, 2024 13:13
@CLAassistant
Copy link

CLAassistant commented Dec 22, 2024

CLA assistant check
All committers have signed the CLA.

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.

2 participants