diff --git a/src/course-outline/data/slice.js b/src/course-outline/data/slice.js index ec9b6975a5..d376d62412 100644 --- a/src/course-outline/data/slice.js +++ b/src/course-outline/data/slice.js @@ -72,10 +72,8 @@ const slice = createSlice({ state.sectionsList = state.sectionsList.map((section) => (section.id === payload.id ? payload : section)); }, reorderSectionList: (state, { payload }) => { - let sectionsList = [...state.sectionsList]; - sectionsList.sort(function(a, b){ - return payload.indexOf(a.id) - payload.indexOf(b.id); - }); + const sectionsList = [...state.sectionsList]; + sectionsList.sort((a, b) => payload.indexOf(a.id) - payload.indexOf(b.id)); state.sectionsList = [...sectionsList]; },