File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
editors/data/redux/thunkActions Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import {
2424 fetchCourseVerticalChildrenData ,
2525 getCourseOutlineInfoQuery ,
2626 patchUnitItemQuery ,
27+ updateCourseUnitSidebar ,
2728} from './data/thunk' ;
2829import {
2930 getCanEdit ,
@@ -231,8 +232,7 @@ export const useCourseUnit = ({ courseId, blockId }) => {
231232 // edits the component using editor which has a separate store
232233 /* istanbul ignore next */
233234 if ( event . key === 'courseRefreshTriggerOnComponentEditSave' ) {
234- dispatch ( fetchCourseSectionVerticalData ( blockId , sequenceId ) ) ;
235- dispatch ( fetchCourseVerticalChildrenData ( blockId , isSplitTestType ) ) ;
235+ dispatch ( updateCourseUnitSidebar ( blockId ) ) ;
236236 localStorage . removeItem ( event . key ) ;
237237 }
238238 } ;
Original file line number Diff line number Diff line change @@ -126,9 +126,9 @@ export const saveBlock = (content, returnToUnit) => (dispatch) => {
126126 onSuccess : ( response ) => {
127127 dispatch ( actions . app . setSaveResponse ( response ) ) ;
128128 const parsedData = JSON . parse ( response . config . data ) ;
129- if ( parsedData ?. has_changes ) {
129+ if ( parsedData ?. has_changes || ! ( 'has_changes' in parsedData ) ) {
130130 const storageKey = 'courseRefreshTriggerOnComponentEditSave' ;
131- localStorage . setItem ( storageKey , Date . now ( ) ) ;
131+ sessionStorage . setItem ( storageKey , Date . now ( ) ) ;
132132
133133 window . dispatchEvent ( new StorageEvent ( 'storage' , {
134134 key : storageKey ,
You can’t perform that action at this time.
0 commit comments