From: Daniel Karbach Date: Tue, 12 Apr 2022 22:16:08 +0000 (+0200) Subject: copy rounds before reverse X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=180c645fdba5ec6d9d91750690e8ff85fe5a0b99;p=alttp.git copy rounds before reverse --- diff --git a/resources/js/helpers/Tournament.js b/resources/js/helpers/Tournament.js index fac1681..dd87993 100644 --- a/resources/js/helpers/Tournament.js +++ b/resources/js/helpers/Tournament.js @@ -38,7 +38,7 @@ export const getScoreTable = tournament => { runners.forEach(participant => { running[participant.id] = 0; }); - const data = tournament.rounds.reverse().map(round => { + const data = [...tournament.rounds].reverse().map(round => { const entry = { number: `#${round.number}` }; runners.forEach(participant => { const result = Participant.findResult(participant, round);