diff --git a/src/app/content/practiceQuestions/components/PracticeQuestionsPopup.tsx b/src/app/content/practiceQuestions/components/PracticeQuestionsPopup.tsx index aee88a234d..49c3b1a2d1 100644 --- a/src/app/content/practiceQuestions/components/PracticeQuestionsPopup.tsx +++ b/src/app/content/practiceQuestions/components/PracticeQuestionsPopup.tsx @@ -31,7 +31,15 @@ const PracticeQuestionsPopup = () => { if (!assertWindow().confirm(message)) { return; } } - dispatch(push(assertDefined(match, 'match should be always defined at this step'))); + const definedMatch = assertDefined(match, 'match should be always defined at this step'); + + if ('search' in definedMatch && typeof definedMatch.search === 'string') { + const params = new URLSearchParams(definedMatch.search); + params.delete('modal'); + definedMatch.search = params.toString(); + } + + dispatch(push(definedMatch)); trackOpenClosePQ(method); }, [currentQuestionIndex, trackOpenClosePQ, intl, dispatch, match]);