fix(transformers): remove new line from champion icon url

This commit is contained in:
Valentin Kaelin 2020-10-10 22:05:09 +02:00
parent 58ade06bc0
commit f00f13b0a4

View file

@ -43,11 +43,9 @@ export default abstract class MatchTransformer {
* @param id of the champion * @param id of the champion
*/ */
public getChampion (id: number) { public getChampion (id: number) {
const champion = { ...this.champions.find(c => c.id === id) } const champion = { ...this.champions.find((c: any) => c.id === id) }
champion.icon = ` champion.icon = 'https://raw.communitydragon.org/latest/plugins/rcp-be-lol-game-data/global/default/'
https://raw.communitydragon.org/latest/plugins/rcp-be-lol-game-data/global/default/ + `${champion.squarePortraitPath.split('/assets/')[1].toLowerCase()}`
${champion.squarePortraitPath.split('/assets/')[1].toLowerCase()}
`
delete champion.squarePortraitPath delete champion.squarePortraitPath
return champion return champion
} }