-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
[Bug]: Preview breaks in MDX when Story block of
property is undefined
#20841
Comments
would love to fix this |
@dev-phantom feel free to work on it if you want! |
@tmeasday I think this is now good after your changes, right? |
@yannbf which changes are you referring to? If you mean the indexing errors, I'm not 100% sure. I think it checks the of is a stories file, so it'll error. We should test it out. |
I reckon the issue here is just more we don't show the error when an MDX errors for any reason. For instance if you forget to import the |
Ermahgerd!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.0.0-beta.61 containing PR #21365 that references this issue. Upgrade today to the
|
Describe the bug
It's quite common to mistype when authoring stories in MDX if you don't have intellisense.
Here's an example when you have everything correct in your MDX. It renders everything fine:
However as soon as you introduce a single issue with the
of
property, pointing to undefined:The entire preview breaks.
Would it be possible to have an error boundary in it so that only that “404” element stops working? Like how it works with that “broken image icon” which is shown when you have a wrong URL in an tag?
To Reproduce
The text was updated successfully, but these errors were encountered: