-
-
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
[Storybook 6.4] argTypeTargetsV7 breaks on stories without args #16743
Comments
🤔 hmm, why would |
@yannbf is there something different you are doing here? I am not seeing it: export const CSF1 = (args, context) => console.log(args, context) || <div>Hello</div> |
Hey @tmeasday I've got a simple way to reproduce it in the monorepo, I updated the steps in the issue description. Hope it helps! |
Ahh, got it, the component I was testing had some auto-generated |
Jiminy cricket!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.4.0-rc.10 containing PR #16790 that references this issue. Upgrade today to the
Closing this issue. Please re-open if you think there's still more to do. |
Describe the bug
To Reproduce
1 - Go to
react-ts
2 - Enable argTypeTargetsV7:
3 - Run react-ts storybook
3 - Go to http://localhost:9011/?path=/story/examples-emoji-button--basic
4 - Get the error. This is the story that causes the error:
It actually happens with any story that does not define args or argTypes, be it CSF1 2 or 3.
Things should break because
context.args
is undefined here:https://github.com/storybookjs/storybook/blob/next/lib/store/src/prepareStory.ts#L169
The text was updated successfully, but these errors were encountered: