setOptions({ theme: themes.dark })
Page crashes with
Uncaught TypeError: Cannot read property 'name' of undefined
@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.
@ndelangen I repro'd with parameter style in official-storybook, FYI
I see, will investigate
@ndelangen Still seeing this on rc.9 even after merging #5787 馃槮
Same on rc.10. I think I'll remove my custom theme for now
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.