From 357c4bc3e58f37d870cbc0bafd3be38241ce9983 Mon Sep 17 00:00:00 2001 From: gigobyte Date: Fri, 9 Mar 2018 20:00:57 +0200 Subject: [PATCH] meant v.2.7.0; removed semicolons --- src/endpoints/getTeam.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/endpoints/getTeam.ts b/src/endpoints/getTeam.ts index 5cb952a8..1d8bb323 100644 --- a/src/endpoints/getTeam.ts +++ b/src/endpoints/getTeam.ts @@ -16,9 +16,9 @@ const getTeam = (config: HLTVConfig) => async ({ id }: { id: number }): Promise< const twitter = t$('.twitter').parent().attr('href') const rank = Number(t$('.profile-team-stat .right').first().text().replace('#', '')) || undefined - const arePlayerPicturesOfficial = toArray(t$('.overlayImageFrame')).length > 0; - const playerSelector = arePlayerPicturesOfficial ? '.overlayImageFrame' : '.overlayImageFrame-square'; - const playerImageSelector = arePlayerPicturesOfficial ? '.bodyshot-team-img' : '.profileImage'; + const arePlayerPicturesOfficial = toArray(t$('.overlayImageFrame')).length > 0 + const playerSelector = arePlayerPicturesOfficial ? '.overlayImageFrame' : '.overlayImageFrame-square' + const playerImageSelector = arePlayerPicturesOfficial ? '.bodyshot-team-img' : '.profileImage' const getPlayerId = (el: Cheerio) => arePlayerPicturesOfficial ? Number((E.popSlashSource(el) as string).split('.')[0]) @@ -46,7 +46,7 @@ const getTeam = (config: HLTVConfig) => async ({ id }: { id: number }): Promise< try { const rankings = JSON.parse(t$('.graph').attr('data-fusionchart-config')) - rankingDevelopment = rankings.dataSource.dataset[0].data.map(x => x.value).map(Number); + rankingDevelopment = rankings.dataSource.dataset[0].data.map(x => x.value).map(Number) } catch { rankingDevelopment = [] }