sessionsWrite error with tags
Describe the bug I was adding some sessions and speakers I got this error:
4:58:16.679 PM sessionsWrite Function execution took 1486 ms, finished with status: 'error'
4:58:17.740 PM sessionsWrite TypeError: Cannot read properties of undefined (reading 'tags') at sessionsSpeakersScheduleMap (file:///workspace/dist/schedule-generator/speakers-sessions-schedule-map.js:23:48) at generateAndSaveData (file:///workspace/dist/generate-sessions-speakers-schedule.js:67:25) at processTicksAndRejections (node:internal/process/task_queues:96:5)
seems like an issue with tags Any idea?
To Reproduce Steps to reproduce the behavior:
- Add sessions and speakers
- Cloud function show errors
Expected behavior generate sessions and schedule
I think #2357 should fix this.
Actually I have an older version const mainTag = subsession.tags && subsession.tags.length ? subsession.tags[0] : 'General';
But this is weird, I have the same tag everywhere
Ok I think it was cause by an empty string "" in schedule
What value had the empty string?
The schedule generation code is really complex and error prone. I just haven't had time to refactor it yet.