✅ 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 || ''
|
||||
|
||||
@@ -153,7 +153,7 @@ export default function Sidebar({ user, activeTab, setActiveTab, sidebarOpen, se
|
||||
className="w-10 h-10 object-contain bg-white rounded p-1"
|
||||
/>
|
||||
<p className="text-xs text-indigo-300 font-medium hover:text-indigo-200">
|
||||
Ayutec v1.3.2
|
||||
Ayutec v1.3.3
|
||||
</p>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user