Skip to content

Commit

Permalink
Merge pull request #237 from osu-tournament-rating/hotfix/id-parsing
Browse files Browse the repository at this point in the history
hotfix match id parsing
  • Loading branch information
hburn7 authored Dec 25, 2024
2 parents 221f4dd + 602b005 commit 246b27e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/actions/tournaments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ export async function tournamentSubmissionFormAction(
}

// Try to extract the id using regex
const match = MatchLinkPattern.exec(s);
return match ? parseFloat(match[1]) : s;
return MatchLinkPattern.test(s)
? parseFloat(s.substring(s.lastIndexOf('/') + 1))
: s;
}),
beatmapIds: value => value
.split(/\r?\n/g)
Expand Down

0 comments on commit 246b27e

Please sign in to comment.