giorgosart/react-easy-edit

No value is returned from the function '_onFocus' defined at line 91

Closed this issue · 0 comments

From Deepscan:
image

Return value of function without any return statement should not be used

This rule applies when return value is used even though the function has no return statement.

In such a case, it could be a programmer's mistake forgetting a return statement.

Note: This rule applies only when the return value is assigned to an object property because in other cases, it is often intended or harmless.

Code Example
function add(x, y) {
    x + y;
}
obj.total = add(1, 2); // MISSING_RETURN_VALUE alarm because function 'add' does not return a value.
Revised Code Example
function add(x, y) {
    return x + y;
}
obj.total = add(1, 2);