Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
[PRTL-2856] reduce restrictive lifecycle check (#2726)
Browse files Browse the repository at this point in the history
This check didn’t account for the current_analysis ID being changed for some unexplainable reason (which is truly a symptom of a deeper problem).
To keep this issue’s scope, I’m just loosening the check. the source problem, remains as technical debt.
  • Loading branch information
justincorrigible authored Sep 27, 2019
1 parent 2340a1c commit 7136271
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -393,21 +393,21 @@ export default compose(
),
lifecycle({
shouldComponentUpdate({
currentAnalysis: { displayVariables: nextDisplayVariables },
currentAnalysis: nextCurrentAnalysis,
searchValue: nextSearchValue,
totalClinicalAnalysisFields: nextTotalClinicalAnalysisFields,
totalUsefulFacets: nextTotalUsefulFacets,
}) {
const {
currentAnalysis: { displayVariables },
currentAnalysis,
searchValue: prevSearchValue,
totalClinicalAnalysisFields,
totalUsefulFacets,
} = this.props;

return !(
nextTotalClinicalAnalysisFields === totalClinicalAnalysisFields &&
isEqual(nextDisplayVariables, displayVariables) &&
isEqual(nextCurrentAnalysis, currentAnalysis) &&
nextSearchValue === prevSearchValue &&
nextTotalUsefulFacets === totalUsefulFacets
);
Expand Down

0 comments on commit 7136271

Please sign in to comment.