Skip to content

Commit

Permalink
lint: fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
steff456 committed Dec 8, 2023
1 parent b75dcad commit a4eca74
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/course-outline/data/slice.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
},
Expand Down

0 comments on commit a4eca74

Please sign in to comment.