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

White screen when story has no design config #29

Closed
Romanchuk opened this issue Jan 22, 2020 · 4 comments · Fixed by #30
Closed

White screen when story has no design config #29

Romanchuk opened this issue Jan 22, 2020 · 4 comments · Fixed by #30
Labels
category: bug Something isn't working

Comments

@Romanchuk
Copy link

Storybook: 5.3.8
storybook-addon-designs: 5.1.1

Exception occurs when you click on Design panel if story has no design config (user sees white screen).

Uncaught TypeError: Cannot use 'in' operator to search for 'length' in undefined

Group of stories decorated "withDesign", but story some stories has no design config.

storiesOf('Controls', module)
	.addDecorator(withKnobs({ escapeHTML: false }))
	.addDecorator(withThemes(THEMES))
	.addDecorator(withDesign)
	.add('Checklists', data => {
		return {
..

http://joxi.ru/D2PKWaaSqxPGzm

I suggest to hide "Design" button if there is no design config in story or handle this exception to avoid braking the whole storybook.

@pocka pocka added the category: bug Something isn't working label Jan 22, 2020
@Romanchuk
Copy link
Author

Romanchuk commented Jan 22, 2020

i see in code you have:

skipIfNoParameterOrOptions: true

But no code references to it

@pocka
Copy link
Collaborator

pocka commented Jan 22, 2020

thanks, turned out it's a typo 😦

- skipIfNoParameterOrOptions
+ skipIfNoParametersOrOptions

@pocka
Copy link
Collaborator

pocka commented Jan 22, 2020

Fixed in v5.1.2

@Romanchuk
Copy link
Author

Thanks, now it works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants