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

Fix crash in boolean-prop-naming when encountering a required shape p… #1792

Merged
merged 1 commit into from
May 13, 2018

Conversation

pcorpet
Copy link
Contributor

@pcorpet pcorpet commented May 12, 2018

…rop type. Fixes #1791.

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just one comment

@@ -76,7 +76,10 @@ module.exports = {
if (node.value.property) {
const name = node.value.property.name;
if (name === 'isRequired') {
return node.value.object.property.name;
if (node.value.object.property) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if node.value.object is falsy?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't find a case where node.value has a property but no object. But I added a guard anyways.

@yannickcr yannickcr merged commit 5e5895f into jsx-eslint:master May 13, 2018
@yannickcr
Copy link
Member

Merged, thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants