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: crash on attempt to uncolorize Symbol #188

Merged
merged 1 commit into from
Jul 5, 2022
Merged

Conversation

Alexsey
Copy link
Contributor

@Alexsey Alexsey commented Jul 5, 2022

The .strip method of @colors/colors/safe is crashing when obtaining Symbol. According to its type definitions, non-strings are not supported. This PR would ensure that only string is provided.

The provided test is crashing without the fix, just as expected.

Tested also with winston - without the fix, usage of uncolorize with Symbol is crashing

@wbt
Copy link
Contributor

wbt commented Jul 5, 2022

Thanks for the contribution!

@wbt wbt merged commit a3388f0 into winstonjs:master Jul 5, 2022
@wbt
Copy link
Contributor

wbt commented Jul 5, 2022

Out in 2.4.2.

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