diff --git a/package-lock.json b/package-lock.json
index 96ba6ebd57..da16c6e6b5 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -19,8 +19,8 @@
"dependencies": {
"@edx/brand": "npm:@openedx/brand-openedx@^1.2.2",
"@edx/frontend-component-header": "^5.3.3",
- "@edx/frontend-lib-learning-assistant": "^2.2.2",
- "@edx/frontend-lib-special-exams": "^3.1.1",
+ "@edx/frontend-lib-learning-assistant": "^2.2.4",
+ "@edx/frontend-lib-special-exams": "^3.1.3",
"@edx/frontend-platform": "^8.0.0",
"@edx/openedx-atlas": "^0.6.0",
"@edx/react-unit-test-utils": "3.0.0",
@@ -2441,9 +2441,9 @@
}
},
"node_modules/@edx/frontend-lib-learning-assistant": {
- "version": "2.2.2",
- "resolved": "https://registry.npmjs.org/@edx/frontend-lib-learning-assistant/-/frontend-lib-learning-assistant-2.2.2.tgz",
- "integrity": "sha512-Iy8W9Oz7k6kPp6wvhHgWQOne6I0tJY+/JMLlBhnrSsRZQfYV20IH9oXSDhzBAb4g/SDWvU/hu9fNWwd0l9lTkQ==",
+ "version": "2.2.4",
+ "resolved": "https://registry.npmjs.org/@edx/frontend-lib-learning-assistant/-/frontend-lib-learning-assistant-2.2.4.tgz",
+ "integrity": "sha512-EvN22XhDzzdIYrJY1TKEF/5zXuozC4tlKRo96+dSe9I7UAMg4zsLKC1zqY15oUuyB8rHo1ERYhQBG18uMepXrw==",
"dependencies": {
"@edx/brand": "npm:@edx/brand-openedx@1.2.0",
"@fortawesome/fontawesome-svg-core": "1.2.36",
diff --git a/package.json b/package.json
index 1b8ca1bc62..ece954c455 100644
--- a/package.json
+++ b/package.json
@@ -32,8 +32,8 @@
"dependencies": {
"@edx/brand": "npm:@openedx/brand-openedx@^1.2.2",
"@edx/frontend-component-header": "^5.3.3",
- "@edx/frontend-lib-learning-assistant": "^2.2.2",
- "@edx/frontend-lib-special-exams": "^3.1.1",
+ "@edx/frontend-lib-learning-assistant": "^2.2.4",
+ "@edx/frontend-lib-special-exams": "^3.1.3",
"@edx/frontend-platform": "^8.0.0",
"@edx/openedx-atlas": "^0.6.0",
"@edx/react-unit-test-utils": "3.0.0",
diff --git a/src/courseware/course/new-sidebar/Sidebar.jsx b/src/courseware/course/new-sidebar/Sidebar.jsx
index e8debc661c..189e21e958 100644
--- a/src/courseware/course/new-sidebar/Sidebar.jsx
+++ b/src/courseware/course/new-sidebar/Sidebar.jsx
@@ -6,7 +6,8 @@ import { SIDEBARS } from './sidebars';
const Sidebar = () => {
const { currentSidebar, isDiscussionbarAvailable, isNotificationbarAvailable } = useContext(SidebarContext);
- if (currentSidebar === null || (!isDiscussionbarAvailable && !isNotificationbarAvailable)) { return null; }
+ if (currentSidebar === null || (!isDiscussionbarAvailable && !isNotificationbarAvailable)
+ || !SIDEBARS[currentSidebar]) { return null; }
const SidebarToRender = SIDEBARS[currentSidebar].Sidebar;
return (
diff --git a/src/courseware/course/new-sidebar/SidebarContextProvider.jsx b/src/courseware/course/new-sidebar/SidebarContextProvider.jsx
index a87ed8abde..36993886b1 100644
--- a/src/courseware/course/new-sidebar/SidebarContextProvider.jsx
+++ b/src/courseware/course/new-sidebar/SidebarContextProvider.jsx
@@ -61,6 +61,10 @@ const SidebarProvider = ({
}
}, [hideDiscussionbar, hideNotificationbar]);
+ useEffect(() => {
+ setCurrentSidebar(initialSidebar);
+ }, [shouldDisplaySidebarOpen, initialSidebar]);
+
const handleWidgetToggle = useCallback((widgetId, sidebarId) => {
setHideDiscussionbar(prevWidgetId => (widgetId === WIDGETS.DISCUSSIONS ? true : prevWidgetId));
setHideNotificationbar(prevWidgetId => (widgetId === WIDGETS.NOTIFICATIONS ? true : prevWidgetId));
diff --git a/src/instructor-toolbar/masquerade-widget/MasqueradeWidget.jsx b/src/instructor-toolbar/masquerade-widget/MasqueradeWidget.jsx
index 554703fcfd..0808f0ec41 100644
--- a/src/instructor-toolbar/masquerade-widget/MasqueradeWidget.jsx
+++ b/src/instructor-toolbar/masquerade-widget/MasqueradeWidget.jsx
@@ -135,7 +135,7 @@ class MasqueradeWidget extends Component {
{`${specificLearnerInputText}:`}
this.onError(errorMessage)}