We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc1841f commit cfffab2Copy full SHA for cfffab2
lib/utils.js
@@ -16,7 +16,7 @@ const getReturnNode = (node) => {
16
for (let i = body.length - 1; i >= 0; i -= 1) {
17
if (body[i].type === 'ReturnStatement') {
18
const arg = body[i].argument;
19
- if (arg.type === 'ArrowFunctionExpression' || arg.type === 'FunctionExpression') {
+ if (arg && (arg.type === 'ArrowFunctionExpression' || arg.type === 'FunctionExpression')) {
20
return getReturnNode(arg);
21
}
22
return arg;
tests/code-sanity-samples.js
@@ -6,4 +6,7 @@ module.exports = [
6
7
8
`,
9
+ `const mapStateToProps = () => {
10
+ return;
11
+ };`,
12
];
0 commit comments