fix bug
This commit is contained in:
13
src/apis.js
13
src/apis.js
@@ -295,17 +295,16 @@ export const getGameAPI = async (battleId) => {
|
||||
};
|
||||
});
|
||||
});
|
||||
const totalRounds = Object.keys(data.roundsData).length;
|
||||
(goldenRoundRecords || []).forEach((item, index) => {
|
||||
item.arrowHistory.forEach((arrow) => {
|
||||
if (!data.roundsData[playerStats.length + index + 1]) {
|
||||
data.roundsData[playerStats.length + index + 1] = {};
|
||||
if (!data.roundsData[totalRounds + index + 1]) {
|
||||
data.roundsData[totalRounds + index + 1] = {};
|
||||
}
|
||||
if (!data.roundsData[playerStats.length + index + 1][arrow.playerId]) {
|
||||
data.roundsData[playerStats.length + index + 1][arrow.playerId] = [];
|
||||
if (!data.roundsData[totalRounds + index + 1][arrow.playerId]) {
|
||||
data.roundsData[totalRounds + index + 1][arrow.playerId] = [];
|
||||
}
|
||||
data.roundsData[playerStats.length + index + 1][arrow.playerId].push(
|
||||
arrow
|
||||
);
|
||||
data.roundsData[totalRounds + index + 1][arrow.playerId].push(arrow);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user