Skip to content

Conversation

@G-Rath
Copy link
Collaborator

@G-Rath G-Rath commented Jul 31, 2019

Fixes #357

It's a simple quick fix, as the underlying problem is fixed by the upcoming ts conversation stuff.

@G-Rath G-Rath requested a review from SimenB July 31, 2019 02:41
@G-Rath G-Rath changed the title methodName: ensure method(node) returns truthy before trying to use return/ methodName: ensure method(node) returns truthy before trying to use return Jul 31, 2019
const methodName = node => method(node).name;
const methodName = node => method(node) && method(node).name;

const methodName2 = node => method2(node).name;
Copy link
Member

Choose a reason for hiding this comment

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

Same here? expect(something).not; or something like that?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I could do - I don't think it's needed per say b/c all the rules that use it check using method first, but I'll add it in anyway :)

@SimenB SimenB merged commit 4a6d486 into master Jul 31, 2019
@SimenB SimenB deleted the fix-357 branch July 31, 2019 08:43
@SimenB
Copy link
Member

SimenB commented Jul 31, 2019

🎉 This PR is included in version 22.14.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

3 participants