@@ -82,14 +82,28 @@ export const WithReviewTasks = function (WrappedComponent) {
8282 searchOnCriteria . invertFields = this . state . criteria [ props . reviewTasksType ] . invertFields ;
8383 }
8484
85- if ( searchOnCriteria . savedChallengesOnly === undefined ) {
86- searchOnCriteria . savedChallengesOnly =
87- this . state . criteria [ this . props . reviewTasksType ] ?. savedChallengesOnly ;
88- }
89- if ( searchOnCriteria . excludeOtherReviewers === undefined ) {
90- // Exclude reviews assigned to other reviewers by default
91- searchOnCriteria . excludeOtherReviewers =
92- this . state . criteria [ this . props . reviewTasksType ] ?. excludeOtherReviewers ?? true ;
85+ // Only apply defaults that would affect the URL if we're not skipping URL update
86+ // This prevents adding default parameters to the URL on initial load
87+ if ( ! skipURLUpdate ) {
88+ if ( searchOnCriteria . savedChallengesOnly === undefined ) {
89+ searchOnCriteria . savedChallengesOnly =
90+ this . state . criteria [ this . props . reviewTasksType ] ?. savedChallengesOnly ;
91+ }
92+ if ( searchOnCriteria . excludeOtherReviewers === undefined ) {
93+ // Exclude reviews assigned to other reviewers by default
94+ searchOnCriteria . excludeOtherReviewers =
95+ this . state . criteria [ this . props . reviewTasksType ] ?. excludeOtherReviewers ?? true ;
96+ }
97+ } else {
98+ // On initial load, preserve the original values or use existing state values
99+ if ( searchOnCriteria . savedChallengesOnly === undefined ) {
100+ searchOnCriteria . savedChallengesOnly =
101+ this . state . criteria [ this . props . reviewTasksType ] ?. savedChallengesOnly ?? false ;
102+ }
103+ if ( searchOnCriteria . excludeOtherReviewers === undefined ) {
104+ searchOnCriteria . excludeOtherReviewers =
105+ this . state . criteria [ this . props . reviewTasksType ] ?. excludeOtherReviewers ?? true ;
106+ }
93107 }
94108
95109 // We need to update our list of challenges since some challenges may
0 commit comments