Skip to content

Commit

Permalink
Fixes of copy chapter action
Browse files Browse the repository at this point in the history
  • Loading branch information
WolfyWin committed Dec 19, 2023
1 parent bef7cb4 commit 0ce9516
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,10 @@ actions.copyChapter = (formName, lessonId, chapterSlug) => dispatch => {
dispatch({[API_REQUEST]: {
url: ['apiv2_lesson_chapter_get', {lessonId: lessonId, slug: chapterSlug}],
success: (response, dispatch) => {
dispatch(formActions.resetForm(formName, response, true))
const data = cloneDeep(response)
data.parentSlug = ''
data.id = undefined
dispatch(formActions.resetForm(formName, data, true))
dispatch(actions.chapterLoad(data))
}
}})
Expand Down

0 comments on commit 0ce9516

Please sign in to comment.