File tree Expand file tree Collapse file tree
editors/data/redux/thunkActions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import {
2121 fetchCourseVerticalChildrenData ,
2222 getCourseOutlineInfoQuery ,
2323 patchUnitItemQuery ,
24+ updateCourseUnitSidebar ,
2425} from './data/thunk' ;
2526import {
2627 getCanEdit ,
@@ -221,8 +222,7 @@ export const useCourseUnit = ({ courseId, blockId }) => {
221222 // edits the component using editor which has a separate store
222223 /* istanbul ignore next */
223224 if ( event . key === 'courseRefreshTriggerOnComponentEditSave' ) {
224- dispatch ( fetchCourseSectionVerticalData ( blockId , sequenceId ) ) ;
225- dispatch ( fetchCourseVerticalChildrenData ( blockId , isSplitTestType ) ) ;
225+ dispatch ( updateCourseUnitSidebar ( blockId ) ) ;
226226 localStorage . removeItem ( event . key ) ;
227227 }
228228 } ;
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