✅ Frontend v1.3.3
Fix aplicado: Agregado optional chaining (?.) para prevenir crash cuando inspection.checklist.questions es undefined:
This commit is contained in:
@@ -5657,7 +5657,7 @@ function AIAssistantChatModal({ question, inspection, allAnswers, messages, setM
|
||||
// NUEVO: Agregar respuestas de texto (incluyendo observations)
|
||||
if (answer?.value || answer?.observations) {
|
||||
// Buscar la pregunta para obtener su texto y tipo
|
||||
const questionData = inspection.checklist.questions.find(q => q.id === qId)
|
||||
const questionData = inspection?.checklist?.questions?.find(q => q.id === qId)
|
||||
|
||||
// Formatear respuesta según el tipo de pregunta
|
||||
let formattedAnswer = answer.value || ''
|
||||
|
||||
Reference in New Issue
Block a user