From 418bba8de5c8f3e78652d895fc638f18a88cdede Mon Sep 17 00:00:00 2001 From: Peter Kulko <93188219+PKulkoRaccoonGang@users.noreply.github.com> Date: Thu, 11 Apr 2024 16:49:19 +0300 Subject: [PATCH] fix: [AXIMST-785] fixed discard logic (#232) --- src/course-unit/data/thunk.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/course-unit/data/thunk.js b/src/course-unit/data/thunk.js index a583e9756c..d6fb3a169e 100644 --- a/src/course-unit/data/thunk.js +++ b/src/course-unit/data/thunk.js @@ -8,6 +8,7 @@ import { RequestStatus } from '../../data/constants'; import { NOTIFICATION_MESSAGES } from '../../constants'; import { updateModel, updateModels } from '../../generic/model-store'; import { updateClipboardData } from '../../generic/data/slice'; +import { PUBLISH_TYPES } from '../constants'; import { getCourseUnitData, editUnitDisplayName, @@ -138,6 +139,9 @@ export function editCourseUnitVisibilityAndData(itemId, type, isVisible, groupAc dispatch(updateCourseVerticalChildren(courseVerticalChildrenData)); dispatch(hideProcessingNotification()); dispatch(updateSavingStatus({ status: RequestStatus.SUCCESSFUL })); + if (type === PUBLISH_TYPES.discardChanges) { + window.location.reload(); + } } }); } catch (error) {