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

Using any theme makes addon-a11y crash #5780

Closed
Hypnosphi opened this issue Feb 27, 2019 · 7 comments
Closed

Using any theme makes addon-a11y crash #5780

Hypnosphi opened this issue Feb 27, 2019 · 7 comments

Comments

@Hypnosphi
Copy link
Member

  1. Use a theme, e.g.:
setOptions({ theme: themes.dark })
  1. Open accessibility tab

Page crashes with

Uncaught TypeError: Cannot read property 'name' of undefined
@Hypnosphi Hypnosphi changed the title Using any theme makes storybook crash Using any theme makes storybook v5 crash Feb 27, 2019
@Hypnosphi Hypnosphi added this to the v5.0.0 milestone Feb 27, 2019
@shilman shilman changed the title Using any theme makes storybook v5 crash Using any theme makes addon-a11y crash Feb 27, 2019
@ndelangen ndelangen self-assigned this Mar 1, 2019
@ndelangen
Copy link
Member

ndelangen commented Mar 1, 2019

@Hypnosphi Setting a theme as a parameter is recommended:

// config.js

import { themes } from '@storybook/theming';
import { configure, addParameters } from '@storybook/react';

addParameters({
  options: {
    theme: themes.light,
  },
});

That should work, but I'll look into why the code you posted results in an error.

@shilman
Copy link
Member

shilman commented Mar 1, 2019

@ndelangen I repro'd with parameter style in official-storybook, FYI

@ndelangen
Copy link
Member

I see, will investigate

@ndelangen
Copy link
Member

Fixed in #5787

@shilman
Copy link
Member

shilman commented Mar 3, 2019

@ndelangen Still seeing this on rc.9 even after merging #5787 😦

@Hypnosphi
Copy link
Member Author

Hypnosphi commented Mar 4, 2019

Same on rc.10. I think I'll remove my custom theme for now

@shilman
Copy link
Member

shilman commented Mar 5, 2019

Yippee!! I just released https://github.com/storybooks/storybook/releases/tag/v5.0.0-rc.11 containing PR #5843 that references this issue. Upgrade today to try it out!

Because it's a pre-release you can find it on the @next NPM tag.

Closing this issue. Please re-open if you think there's still more to do.

@shilman shilman closed this as completed Mar 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants