210 card.removeEventListener('mouseleave', exit)
211 }
212 } catch {
213 return () => void 0214 }
215 }, [cardRef, createTweens])
216
115 mapMarker.remove(mapMarkerData.id)
116 }
117 } catch {
118 return void 0119 }
120 }, [mapMarker, mapMarkerData])
121
53 google.maps.event.removeListener(mapListener)
54 }
55 }
56 return () => void 0 57 // eslint-disable-next-line react-hooks/exhaustive-deps
58 }, [map, infoWindow])
59
156 return void 0
157 }
158 form.setFieldValue('communityFocus', unique([...selectedCurr, ...childIds]))
159 return void 0160 },
161 [communities, form, getChildIds, selectedChildren, selectedCurr]
162 )
153 'communityFocus',
154 selectedCurr.filter((id) => !childIds.includes(id))
155 )
156 return void 0157 }
158 form.setFieldValue('communityFocus', unique([...selectedCurr, ...childIds]))
159 return void 0
A return;
statement with nothing after it is redundant, and has no effect on the runtime behavior of a function.
This can be confusing, so it's better to disallow these redundant statements.
function foo() { return; }
function foo() {
doSomething();
return;
}
function foo() {
if (condition) {
bar();
return;
} else {
baz();
}
}
function foo() {
switch (bar) {
case 1:
doSomething();
default:
doSomethingElse();
return;
}
}
function foo() { return 5; }
function foo() {
return doSomething();
}
function foo() {
if (condition) {
bar();
return;
} else {
baz();
}
qux();
}
function foo() {
switch (bar) {
case 1:
doSomething();
return;
default:
doSomethingElse();
}
}
function foo() {
for (const foo of bar) {
return;
}
}