arrow_back
Back to Tickets
Edit Trouble Ticket
Update the ticket information below
Date Initiated
*
Status
*
Open
Pending
Completed
Terminated
Creator
*
Priority
*
3
Urgent
Select urgency...
Urgent
Not Urgent
Important
Select importance...
Important
Not Important
Project Name
*
zfrika
Problem
*
messages the search button doesnt work
Question
Root Cause
Notes
Strategy
Helpful People
Helpful Links
Diagram
Previous Steps
Next Steps
Solution
The issue in your code is that your messages are inconsistent—likely, received messages might be missing a to property, or sent messages might be missing a from property. When JavaScript tries to run .toLowerCase() on a property that doesn't exist, it crashes the whole function. Here is the fixed version of your updateMessagesList method. I have added Optional Chaining (?.) and fallback empty strings || '' to ensure the search is "bulletproof."
Insight
Date Resolved
save
Update Ticket
Cancel