Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Update getTeam enemyTeam.id logic (#337)
Currently, the `getTeam` endpoint throws an error: ``` Cannot read property 'split' of undefined ``` After a bit of digging, I found out that it was happening on this line: https://github.com/gigobyte/HLTV/blob/master/src/endpoints/getTeam.ts#L45 `popSlashSource` is looking for `.attr('src')` on an `img` that doesn't exist. Instead, `.team-row .team-2` is an `a` tag that has the team ID in its `href`, so I changed this line to parse the team ID from there.
- Loading branch information