fix: null should be convert to undefined

main
spacemeowx2 2022-11-02 17:01:40 +08:00
parent 4a14357400
commit 878731e473
2 changed files with 2 additions and 2 deletions

View File

@ -263,7 +263,7 @@ export class StatInkExporter implements GameExporter {
} }
result.our_team_count = myTeam?.result?.score ?? undefined; result.our_team_count = myTeam?.result?.score ?? undefined;
result.their_team_count = otherTeams?.[0]?.result?.score ?? undefined; result.their_team_count = otherTeams?.[0]?.result?.score ?? undefined;
result.rank_exp_change = bankaraMatch?.earnedUdemaePoint; result.rank_exp_change = bankaraMatch?.earnedUdemaePoint ?? undefined;
if (listNode) { if (listNode) {
[result.rank_before, result.rank_before_s_plus] = parseUdemae( [result.rank_before, result.rank_before_s_plus] = parseUdemae(
listNode.udemae, listNode.udemae,

View File

@ -138,7 +138,7 @@ export type VsHistoryDetail = {
playedTime: string; // 2021-01-01T00:00:00Z playedTime: string; // 2021-01-01T00:00:00Z
bankaraMatch: { bankaraMatch: {
earnedUdemaePoint: number; earnedUdemaePoint: null | number;
mode: "OPEN" | "CHALLENGE"; mode: "OPEN" | "CHALLENGE";
} | null; } | null;
festMatch: { festMatch: {