diff --git a/client/modules/IDE/reducers/files.js b/client/modules/IDE/reducers/files.js index 1f03e8de..9be4667e 100644 --- a/client/modules/IDE/reducers/files.js +++ b/client/modules/IDE/reducers/files.js @@ -116,7 +116,7 @@ function sortedChildrenId(state, children) { return childrenArray.map(child => child.id); } -function udpateParent(state, action) { +function updateParent(state, action) { return state.map((file) => { if (file.id === action.parentId) { const newFile = Object.assign({}, file); @@ -165,7 +165,7 @@ const files = (state, action) => { case ActionTypes.CREATE_FILE: // eslint-disable-line { const newState = [ - ...udpateParent(state, action), + ...updateParent(state, action), { name: action.name, id: action.id,