Anton Tranelis 171f6a2b59
fix: prevent 'Cannot read properties of undefined (reading '0')' errors (#385)
- Add proper array length checks before accessing error.errors[0]
- Secure error handling in App.tsx for both map loading and layer loading
- Fix unsafe array access in mapApi.ts error handler
- Prevent crashes when error.errors is undefined or empty array

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-09-15 11:47:09 +02:00
..
2025-07-11 13:37:05 +02:00
2025-07-11 13:37:05 +02:00
2025-07-11 13:37:05 +02:00
2025-07-11 13:37:05 +02:00

App

Troubleshooting

Map doesn't load and the Error You must define the Admin roll in the .env file! shows in the console.

In order to get the map running you need to define the correct uuid of the admin roll in the .env file.

Go to http://localhost:8055 and login with the admin credentials. Navigate to http://localhost:8055/admin/settings/roles and click Administrator and copy the UUID from the URL.

Put this UUID in the .env as VITE_DIRECTUS_ADMIN_ROLE=UUID