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

Add toString to fix bug in storybook #34

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

Conversation

matthew-gerstman
Copy link

Storybook seems to be passing integers to sanitize causing it to crash the application. I've tested that adding toString prevents it from breaking.

@matthew-gerstman
Copy link
Author

FYI this happens whenever calling a function called add with a numeric literal passed to it inside of my applicattion source code

@zhyd1997
Copy link

Hey @matthew-gerstman

I faced the same issue and explained it in details here: storybookjs/storybook#18930 (comment)

@zhyd1997
Copy link

And I think white list (only accept string type) is better than black list (accept other types, eg. number and Object, and do some additional operations and then return string value) here.

@shilman shilman added the bug Something isn't working label Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants