Commit 5316d049 authored by nanahira's avatar nanahira

fix

parent f83e1901
Pipeline #2283 passed with stages
in 27 seconds
......@@ -85,7 +85,7 @@ async function migrateMatch(match: Match) {
return;
}
let winner_id: string | number;
if (typeof(oldMatch.winner_id) === "number") {
if (typeof(oldMatch.winner_id) === "number" && oldParticipantIdMap.has(oldMatch.winner_id)) {
const winnerName = oldParticipantIdMap.get(oldMatch.winner_id as number).name;
winner_id = newParticipantNameMap.get(winnerName).id;
console.log(`Migrating match ${currentMatchPlayer1Name} vs ${currentMatchPlayer2Name} with winner ${winnerName}.`);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment