From 4029f125e311e713c75dce73dc6ab1a9815f1af5 Mon Sep 17 00:00:00 2001 From: Corey Peterson Date: Mon, 16 Oct 2023 16:16:14 -0400 Subject: [PATCH] Fixes score merging in playscoresget query when handling paginated score results --- src/components/my-widgets-score-semester-individual.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/my-widgets-score-semester-individual.jsx b/src/components/my-widgets-score-semester-individual.jsx index ce6994872..5c20c0dca 100644 --- a/src/components/my-widgets-score-semester-individual.jsx +++ b/src/components/my-widgets-score-semester-individual.jsx @@ -41,7 +41,7 @@ const MyWidgetScoreSemesterIndividual = ({ semester, instId }) => { let newLogs = state.logs result.pagination.forEach((record) => { - if (newLogs[record.userId]) newLogs[record.userId].scores.push({...record.scores}) + if (newLogs[record.userId]) newLogs[record.userId].scores.push(...record.scores) else newLogs[record.userId] = { userId: record.userId, name: record.name, searchableName: record.searchableName, scores: record.scores } newLogs[record.userId].scores.sort(_compareScores) })