Error "Cannot read property 'map' of undefined" when selecting a show
Error Cannot read property 'map' of undefined in the console when selecting a show without a seasonDetails.genre_ids property, causing an app softlock (the loading animation cannot be dismissed).
Stream Box version: c989568276a15a3c8c6b3d3ca9d4f66153cfb970
Full error:
Unhandled Rejection at: Promise Promise {
<rejected> TypeError: Cannot read property 'map' of undefined
at EventEmitter.<anonymous> (C:\[...]\stream-box\index.js:258:35)
at processTicksAndRejections (internal/process/task_queues.js:89:5)
} reason: TypeError: Cannot read property 'map' of undefined
at EventEmitter.<anonymous> (C:\[...]\stream-box\index.js:258:35)
at processTicksAndRejections (internal/process/task_queues.js:89:5)
I have never come across a series or movie without that property, can you provide the name of the media so I can check it out further?
Series I encountered this issue with is Disney's Amphibia.
An easy fix would be creating an empty array variable, then wrapping the map function in a try/catch block. Then, when sending the update, send the variable created earlier.