Skip to content

Commit

Permalink
refactor: minor fix (#1163)
Browse files Browse the repository at this point in the history
  • Loading branch information
mark86092 authored Sep 12, 2023
1 parent d4364b7 commit 16ef498
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/actions/experience.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,13 @@ export const loadMoreRelatedExperiences = () => async (
);
}
} catch (error) {
dispatch(setRelatedExperiencesState(getError(error)));
const previousState = relatedExperiencesStateSelector(getState()); // FetchBox

if (
experienceId === previousState.data.experienceId &&
page === previousState.data.page
) {
dispatch(setRelatedExperiencesState(getError(error)));
}
}
};

0 comments on commit 16ef498

Please sign in to comment.