manrajgrover / football-cli

⚽ Command line interface for Hackers who love football
MIT License
1.07k stars 80 forks source link

Bug: Handle multiple standings response in League standings #28

Closed manrajgrover closed 6 years ago

manrajgrover commented 6 years ago

Description

Case where there are multiple groups in standings is currently not handled. This needs to be fixed.

Versions

Error

/Users/manrajsingh/Github/football-cli/helpers.js:222
      for (let team of group) {
                       ^

TypeError: group is not iterable
    at standings (/Users/manrajsingh/Github/football-cli/helpers.js:222:24)
    at Request.request [as _callback] (/Users/manrajsingh/Github/football-cli/cli.js:197:9)
    at Request.self.callback (/Users/manrajsingh/Github/football-cli/node_modules/request/request.js:187:22)
    at Request.emit (events.js:159:13)
    at Request.<anonymous> (/Users/manrajsingh/Github/football-cli/node_modules/request/request.js:1048:10)
    at Request.emit (events.js:159:13)
    at IncomingMessage.<anonymous> (/Users/manrajsingh/Github/football-cli/node_modules/request/request.js:969:12)
    at IncomingMessage.emit (events.js:164:20)
    at endReadableNT (_stream_readable.js:1054:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)

Expected behaviour

League standings should be shown

Steps to recreate

$ football standings -l CL

People to notify

@Manrajgrover

manrajgrover commented 6 years ago

Fixed in e1a0353d02c90552c3243e03372ca4000487667c