corrected a typo
This commit is contained in:
parent
4b022dd0e8
commit
932f24cd9e
1 changed files with 2 additions and 2 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue