Skip to content

fix: crash on attempt to uncolorize Symbol#188

Merged
wbt merged 1 commit intowinstonjs:masterfrom
Alexsey:master
Jul 5, 2022
Merged

fix: crash on attempt to uncolorize Symbol#188
wbt merged 1 commit intowinstonjs:masterfrom
Alexsey:master

Conversation

@Alexsey
Copy link
Copy Markdown
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
Copy Markdown
Contributor

wbt commented Jul 5, 2022

Thanks for the contribution!

@wbt wbt merged commit a3388f0 into winstonjs:master Jul 5, 2022
@wbt
Copy link
Copy Markdown
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