Skip to content

Commit 6b28133

Browse files
authored
Update ErrorReducer.js
1 parent 5981ce2 commit 6b28133

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/stores/error/ErrorReducer.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,16 @@ export default class ErrorReducer {
4040
*/
4141
const isStartRequestType = type.includes('REQUEST_') && !isFinishedRequestType;
4242

43-
if (isStartRequestType === true) {
43+
if (isStartRequestType) {
4444
// remove the finished type that is associated with the start type because the start action has been re-dispatched
4545
const { [`${type}_FINISHED`]: value, ...stateWithoutFinishedType } = state;
4646

4747
return stateWithoutFinishedType;
4848
}
4949

50-
const isError = isFinishedRequestType && error;
50+
const isError = isFinishedRequestType && Boolean(error);
5151

52-
if (isError === false) {
52+
if (isError) {
5353
return state;
5454
}
5555

0 commit comments

Comments
 (0)