mparkms / nodecg-for-smash

NodeCG bundles for use with SSBM tournament streams.
MIT License
24 stars 6 forks source link

ssmb-bracket issues with brackets of less than 8 players. #1

Closed claabs closed 8 years ago

claabs commented 8 years ago

Brackets of 4 players or less: Nodecg crashes with error:

TypeError: Cannot read property 'match' of undefined
    at parseMatches (...\ssbm-bracket\node-challonge-ext.js:58:21)
    at client.participants.index.callback (...\ssbm-bracket\node-challonge-ext.js:25:18)
    at IncomingMessage.<anonymous> (...\ssbm-bracket\node-challonge\lib\api\client.js:162:4)
    at IncomingMessage.emit (events.js:129:20)
    at _Stream_readable.js:908:16
    at process._tickCallback (node.js:355:11)

Brackets of 5-7 players: L1M1, L1M2, and L2M1 are incorrectly populated with R1M1, R1M2, and R2M1 respectively. (Depending on number of players). These fields should be empty.

Round Robin and Single Elimination brackets also import weirdly as expected. Not a huge issue though.

mparkms commented 8 years ago

Thanks for letting me know, will fix for less than 8 players. I'll just disallow non-DE brackets from being imported entirely.

mparkms commented 8 years ago

Fixed. Imported brackets with less than 8 players don't show byes, but I don't think it's a big deal.