diff --git a/src/course-home/outline-tab/OutlineTab.jsx b/src/course-home/outline-tab/OutlineTab.jsx
index 2012d99f91..a2ce8101ea 100644
--- a/src/course-home/outline-tab/OutlineTab.jsx
+++ b/src/course-home/outline-tab/OutlineTab.jsx
@@ -115,7 +115,11 @@ const OutlineTab = ({ intl }) => {
// Deleting the course_start query param as it only needs to be set once
// whenever passed in query params.
currentParams.delete('start_course');
- navigate(`?${currentParams.toString()}`, { replace: true });
+ navigate({
+ pathname: location.pathname,
+ search: `?${currentParams.toString()}`,
+ replace: true,
+ });
}
}, [location.search]);
diff --git a/src/decode-page-route/index.jsx b/src/decode-page-route/index.jsx
index 15a0d0e102..be588b23c8 100644
--- a/src/decode-page-route/index.jsx
+++ b/src/decode-page-route/index.jsx
@@ -39,7 +39,7 @@ const DecodePageRoute = ({ children }) => {
// if the url get decoded, reroute to the decoded url
if (newUrl !== pathname) {
- return ;
+ return ;
}
}
diff --git a/src/generic/CourseAccessErrorPage.jsx b/src/generic/CourseAccessErrorPage.jsx
index 969d6e2976..210d2b3a48 100644
--- a/src/generic/CourseAccessErrorPage.jsx
+++ b/src/generic/CourseAccessErrorPage.jsx
@@ -38,7 +38,7 @@ const CourseAccessErrorPage = ({ intl }) => {
);
}
if (courseStatus === LOADED) {
- navigate(`/redirect/home/${courseId}`);
+ navigate(`/redirect/home/${courseId}`, { replace: true });
}
return (
<>
diff --git a/src/tab-page/TabPage.jsx b/src/tab-page/TabPage.jsx
index d7746cdd39..83ca70d3ff 100644
--- a/src/tab-page/TabPage.jsx
+++ b/src/tab-page/TabPage.jsx
@@ -53,7 +53,7 @@ const TabPage = ({ intl, ...props }) => {
if (courseStatus === 'denied') {
const redirectUrl = getAccessDeniedRedirectUrl(courseId, activeTabSlug, courseAccess, start);
if (redirectUrl) {
- return ();
+ return ();
}
}