Mapear sobre elementos de matriz no representa todos los element

después de actualizar una respuesta en mi objeto, queda indefinida. Por lo tanto, no se ajusta al resto de mi aplicación, lo que tengo al principio:

0
:
{answers: Array(5), category: {…}, description: null, legacyName: null, name: null, …}
1
:
{answers: Array(3), category: {…}, description: null, legacyName: null, name: null, …}
2
:
{answers: Array(3), category: {…}, description: null, legacyName: null, name: null, …}
3
:
{answers: Array(3), category: {…}, description: null, legacyName: null, name: null, …}
4
:
{answers: Array(2), category: {…}, description: null, legacyName: null, name: null, …}

lo que tengo después del cambio:

0
:
undefined
1
:
undefined
2
:
undefined
3
:
undefined
4
:
undefined

El reductor:

function updateObject(oldObject, newValues) {
  return Object.assign({}, oldObject, newValues);
}

function updateItemInArray(array, questionId,answerId, newValue) {
  return {
    project: array.map(item => {
      if(item.id !== questionId) {
        return item;
      } else {
        item.answers.map(answer => {
          if(answer.id !== answerId) {
            return answer;
          } else {
            updateObject(answer, { value : newValue})
          }
        });
      }
    })
  }
}


export function project(state = [], action){

  switch(action.type){
    case 'PROJECT_FETCH_SUCCESS':
      return action.project; //initialize the project from a fetch
    case 'ANSWER_UPDATE_SUCCESS':
    {
      return updateItemInArray(state, action.questionId, action.answerId, action.newValue); //Want to change a value in one object in the array of arrays
    }
    default:
      return state
  }
}

Lo que quiero hacer es encontrar la matriz en la matriz y luego encontrar el objeto en esa matriz para cambiar su valor. Pero por alguna razón, vuelve indefinido. Las funciones que estoy usando las vi en la documentación de redux:https: //redux.js.org/recipes/structuring-reducers/refactoring-reducers-exampl

Respuestas a la pregunta(1)

Su respuesta a la pregunta