Accessing an element of an empty array and trying to read its properties.
📋 Demo Instructions
Click the "Trigger Error" button below
Open browser console (F12) to see the error
Wait 5-10 seconds for the error to be captured
Go to Dashboard → Performance Monitoring
Click "Fix with Carla" on the error
Review the generated PR
🌍 Real-World Scenario
API returns an empty array when no data is found, but the code assumes at least one item exists. Common in product listings, search results, or user data.
✅ Expected Fix
Add array length check before accessing elements, or use optional chaining on the array access.