Skip to content

Commit

Permalink
Fix team id in getTeamRanking
Browse files Browse the repository at this point in the history
  • Loading branch information
gigobyte committed Sep 20, 2020
1 parent 1c06942 commit 74d5d59
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/endpoints/getTeamRanking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { TeamRanking } from '../models/TeamRanking'
import { Team } from '../models/Team'
import { HLTVConfig } from '../config'
import { fetchPage, toArray } from '../utils/mappers'
import { popSlashSource } from '../utils/parsing'

export const getTeamRanking = (config: HLTVConfig) => async ({
year = '',
Expand Down Expand Up @@ -37,7 +36,7 @@ export const getTeamRanking = (config: HLTVConfig) => async ({

const team: Team = {
name: teamEl.find('.name').text(),
id: Number(popSlashSource(teamEl.find('.team-logo img')))
id: Number(teamEl.find('.moreLink').attr('href')!.split('/')[2])
}

const changeText = teamEl.find('.change').text()
Expand Down

0 comments on commit 74d5d59

Please sign in to comment.