Fix: summonerNames with spaces now work

This commit is contained in:
Valentin Kaelin 2019-08-21 22:50:57 +02:00
parent 7aaf8aa248
commit f366e20b22
2 changed files with 2 additions and 2 deletions

View file

@ -86,7 +86,7 @@ export default {
}, },
formSubmit() { formSubmit() {
console.log('form submit child'); console.log('form submit child');
this.$emit('formSubmit', this.summoner, this.selectedRegion.toLowerCase()); this.$emit('formSubmit', this.summoner.split(' ').join(''), this.selectedRegion.toLowerCase());
} }
} }
}; };

View file

@ -168,7 +168,7 @@ export default {
// Loop on all matches // Loop on all matches
for (let i = 0; i < matches.length; i++) { for (let i = 0; i < matches.length; i++) {
const currentMatch = matches[i]; const currentMatch = matches[i];
const participantId = currentMatch.participantIdentities.find((p) => p.player.accountId === userStats.accountId).participantId const participantId = currentMatch.participantIdentities.find((p) => p.player.currentAccountId === userStats.accountId).participantId
const teamId = currentMatch.participants[participantId - 1].teamId; const teamId = currentMatch.participants[participantId - 1].teamId;
const win = currentMatch.teams.find((t) => t.teamId === teamId).win === 'Win' const win = currentMatch.teams.find((t) => t.teamId === teamId).win === 'Win'