From 88aba19a2d6b752aa389959ea6be15653a89d492 Mon Sep 17 00:00:00 2001 From: spacemeowx2 Date: Fri, 21 Oct 2022 11:30:02 +0800 Subject: [PATCH] refactor: better way to fill fest result --- exporter/stat.ink.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/exporter/stat.ink.ts b/exporter/stat.ink.ts index 7a024f8..0499d5d 100644 --- a/exporter/stat.ink.ts +++ b/exporter/stat.ink.ts @@ -169,7 +169,6 @@ export class StatInkExporter implements BattleExporter { ): Promise { const { knockout, - vsMode: { mode }, vsRule: { rule }, myTeam, otherTeams, @@ -218,10 +217,7 @@ export class StatInkExporter implements BattleExporter { result.special = self.result.special; } - if (mode === "FEST") { - if (!festMatch) { - throw new TypeError("festMatch is null"); - } + if (festMatch) { result.fest_dragon = SPLATNET3_STATINK_MAP.DRAGON[festMatch.dragonMatchType]; result.clout_change = festMatch.contribution;