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

Addon-docs: Remove leading pipe if using raw value for Flow union #12549

Merged
merged 1 commit into from Sep 23, 2020

Conversation

phated
Copy link
Contributor

@phated phated commented Sep 23, 2020

Issue: N/A

What I did

I ran into this issue prior to preferring elements in Flow's union type. In Flow, a Union can be specified with a leading | character, which results in an extra empty string value once processed by storybook. This removes that extra character if we don't have elements (for some reason) and must use the raw value.

How to test

  • Is this testable with Jest or Chromatic screenshots? Yep, added a couple jest tests.
  • Does this need a new example in the kitchen sink apps? Nope
  • Does this need an update to the documentation? Nope

If your answer is yes to any of these, please make sure to include it in your PR.

Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@shilman shilman merged commit 195a08c into storybookjs:next Sep 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants