-
Notifications
You must be signed in to change notification settings - Fork 65
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
hasOnlyOneStatement is throwing TypeError: Cannot read property 'type' of undefined #23
Comments
While it is related source line, this function should not have been called On Thu, Feb 4, 2016 at 2:36 PM, Mikołaj D. notifications@github.com wrote:
|
Yes, you're right, I realized this a minute later and deleted my comment ;) |
Fixed in 1.0.4. |
Now it is failing with:
/**
* Returns whether the node specified has only one statement
* @param {Object} func
* @returns {boolean}
*/
function hasOnlyOneStatement(func) {
return func.type === 'ArrowFunctionExpression' ? !_.get(func, 'body.body') : _.get(func, 'body.body.length') === 1;
} |
@ganimomer Can you make me a contributor? I am only interested in patching bugs such as this. |
Hi, As for your request, you can always submit a PR and we try to get to it ASAP. |
Thank you
|
Input:
Error:
The text was updated successfully, but these errors were encountered: