fix(webkit): fix issue with webkit not supporting .at()

This commit is contained in:
Amruth Pillai
2022-03-11 15:40:25 +01:00
parent 7d8828a358
commit 2654cba039
5 changed files with 6 additions and 6 deletions

View File

@ -82,7 +82,7 @@ export const resumeSlice = createSlice({
},
deleteSection: (state: Resume, action: PayloadAction<DeleteSectionPayload>) => {
const { path } = action.payload;
const id = path ? path.split('.').at(-1) : '';
const id = path.split('.')[1];
const sections = Object.keys(state.sections).filter((x) => x !== id);
const layout = state.metadata.layout.map((pages) => pages.map((list) => list.filter((x) => x !== id)));