corrected a typo

This commit is contained in:
Neelesh 2020-08-04 21:54:45 +05:30
parent 4b022dd0e8
commit 932f24cd9e

View file

@ -116,7 +116,7 @@ function sortedChildrenId(state, children) {
return childrenArray.map(child => child.id); return childrenArray.map(child => child.id);
} }
function udpateParent(state, action) { function updateParent(state, action) {
return state.map((file) => { return state.map((file) => {
if (file.id === action.parentId) { if (file.id === action.parentId) {
const newFile = Object.assign({}, file); const newFile = Object.assign({}, file);
@ -165,7 +165,7 @@ const files = (state, action) => {
case ActionTypes.CREATE_FILE: // eslint-disable-line case ActionTypes.CREATE_FILE: // eslint-disable-line
{ {
const newState = [ const newState = [
...udpateParent(state, action), ...updateParent(state, action),
{ {
name: action.name, name: action.name,
id: action.id, id: action.id,