-
-
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
fix(addons/info): Cannot read property 'props' of undefined #1258
Conversation
fix(addons/info): Cannot read property 'props' of undefined
Codecov Report
@@ Coverage Diff @@
## master #1258 +/- ##
=======================================
Coverage 13.73% 13.73%
=======================================
Files 207 207
Lines 4638 4638
Branches 513 504 -9
=======================================
Hits 637 637
- Misses 3557 3567 +10
+ Partials 444 434 -10
Continue to review full report at Codecov.
|
@evenchange4 Thanks for the contribution! It looks good to me. Can you explain how to reproduce the problem and test the change? Thanks! |
@shilman Sure, I have updated my description above. |
Thanks! Confirmed the problem and added a test in #1259 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requested a small change. what do you think?
@@ -42,8 +42,8 @@ export function A(props) { | |||
const style = { | |||
color: '#3498db', | |||
}; | |||
return <a href={this.props.href} style={style}>{props.children}</a>; | |||
return <a href={props.href} style={style}>{props.children}</a>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: add target="_blank" rel="noopener noreferrer"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, I always put external links here, and there is already @storybook/addon-links
solution for linking between stories at same site.
released https://github.com/storybooks/storybook/releases/tag/v3.1.4 thanks @evenchange4 ! |
Issue:
This error occurred when I want to update storybook. (I use yarn to lock versions.)
What I did
Remove the
this
for functional component.How to test
Add some links for your story description in the second paramter of
addWithInfo
:storiesOf('DomAlign', module).addWithInfo( 'API', ` With config: ${JSON.stringify(alignConfig)}. + Reference: React.js [dom-align](https://github.com/yiminghe/dom-align) integration component. `, () => <Container />, { inline: true, propTables: [DomAlign] }, );
There will be an
a
tag rendered on the page, and this PR fixed theA
component error.Source code
Demo link
Related issue mcs-lite PR#357