beyond-all-reason / bar-lobby

BAR Lobby Client
https://beyond-all-reason.github.io/bar-lobby/
MIT License
32 stars 28 forks source link

Error when joining queue for spadsbattle #251

Open JasonReed-2 opened 9 months ago

JasonReed-2 commented 9 months ago

https://github.com/beyond-all-reason/bar-lobby/blob/8da5b913fd746ba85c0608972177ea6d50428cc1/src/renderer/api/comms.ts#L336

Data.queue is of type Number[]. We assign battle.battleOptions.joinQueueUserIds equal to undefined because we try to access a property that doesn't exist on Number type.

That causes an issue here: https://github.com/beyond-all-reason/bar-lobby/blob/8da5b913fd746ba85c0608972177ea6d50428cc1/src/renderer/model/battle/spads-battle.ts#L215

When we try use indexOf method on undefined.

I see a comment referencing tachyon. This could be fixed as part of that implementation?