mirror of
https://github.com/vkaelin/LeagueStats.git
synced 2026-03-25 12:57:28 +00:00
fix(transformers): remove new line from champion icon url
This commit is contained in:
parent
58ade06bc0
commit
f00f13b0a4
1 changed files with 3 additions and 5 deletions
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue