You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When return; is added to the end of a block, intuitively you should expect it to make no difference to behaviour. However, in a redcr reducer, it results in the reducer returning undefined.
I can't think of a reason anyone would sensibly do this (in fact, maybe eslint would remove it?) but it low-hanging fruit so worth fixing anyway.
Describe the bug
When
return;
is added to the end of a block, intuitively you should expect it to make no difference to behaviour. However, in a redcr reducer, it results in the reducer returningundefined
.I can't think of a reason anyone would sensibly do this (in fact, maybe eslint would remove it?) but it low-hanging fruit so worth fixing anyway.
Sample input
Current output
Specify which ES version you're targeting: ES2020
There are 2 returns, and the first should just be removed entirely.
The text was updated successfully, but these errors were encountered: