refactor: better way to fill fest result

main
spacemeowx2 2022-10-21 11:30:02 +08:00
parent a21dce3433
commit 88aba19a2d
1 changed files with 1 additions and 5 deletions

View File

@ -169,7 +169,6 @@ export class StatInkExporter implements BattleExporter<VsBattle> {
): Promise<StatInkPostBody> { ): Promise<StatInkPostBody> {
const { const {
knockout, knockout,
vsMode: { mode },
vsRule: { rule }, vsRule: { rule },
myTeam, myTeam,
otherTeams, otherTeams,
@ -218,10 +217,7 @@ export class StatInkExporter implements BattleExporter<VsBattle> {
result.special = self.result.special; result.special = self.result.special;
} }
if (mode === "FEST") { if (festMatch) {
if (!festMatch) {
throw new TypeError("festMatch is null");
}
result.fest_dragon = result.fest_dragon =
SPLATNET3_STATINK_MAP.DRAGON[festMatch.dragonMatchType]; SPLATNET3_STATINK_MAP.DRAGON[festMatch.dragonMatchType];
result.clout_change = festMatch.contribution; result.clout_change = festMatch.contribution;