Skip to content

Commit

Permalink
Fixed an issue where secondary pgids were empty
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherBThai committed Jul 30, 2024
1 parent e09f330 commit 17239de
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/commands/commandList/battle/util/teamUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,9 @@ exports.giveXPToUserTeams = async function (
}
const pgid2 = secondaryPgid || (await getSecondaryPgid(p, user));
const secondaryActivePids = await getPrimaryPids(p, pgid2);
await giveXpToPgid(p, pgid2, xp / 2, secondaryXpOverrides, secondaryActivePids);
if (secondaryActivePids.length) {
await giveXpToPgid(p, pgid2, xp / 2, secondaryXpOverrides, secondaryActivePids);
}
};

exports.updateTeamStreak = async function (pgid, { addStreak, resetStreak }) {
Expand Down

0 comments on commit 17239de

Please sign in to comment.