-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Viewport addon hidden by default, does not accept defaultViewport parameter #5757
Comments
Likely broken by a86e25f#diff-0b19096a27d5827867e96b205e01a2ffR13 because it treats the |
This seems to have been a misconfiguration: https://github.com/storybooks/storybook/tree/next/addons/viewport#change-the-default-viewport (change from the alphas? or was it just misconfigured all along?) |
It seems the deprecation message in The Viewport tool also does not render unless it is explicitly configured with |
NOTE: I can repro this in the official storybook in |
Thanks for the report @Jessidhia.
|
Yee-haw!! I just released https://github.com/storybooks/storybook/releases/tag/v5.0.0-rc.10 containing PR #5829 that references this issue. Upgrade today to try it out! Because it's a pre-release you can find it on the Closing this issue. Please re-open if you think there's still more to do. |
Describe the bug
@storybook/addon-viewport
crashes on initial render, which causes storybooks to render a blank page.To Reproduce
It seems that all that you need is to specify a
defaultViewport
:When it is converted by
toList
, it splits the string:When the list is eventually processed,
list.map
tries to access named properties but the only one that exists isid
:Which eventually crashes inside
createItem
:Expected behavior
No crash.
Screenshots
It's a blank page, but I added screenshots of the debugger.
System:
The text was updated successfully, but these errors were encountered: