hoverboard icon indicating copy to clipboard operation
hoverboard copied to clipboard

sessionsWrite error with tags

Open benju69 opened this issue 3 years ago • 4 comments

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:

  1. Add sessions and speakers
  2. Cloud function show errors

Expected behavior generate sessions and schedule

benju69 avatar Apr 04 '22 15:04 benju69

I think #2357 should fix this.

abraham avatar Apr 04 '22 15:04 abraham

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

benju69 avatar Apr 04 '22 16:04 benju69

Ok I think it was cause by an empty string "" in schedule

benju69 avatar Apr 05 '22 08:04 benju69

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.

abraham avatar Apr 05 '22 13:04 abraham