Skip to content

Commit

Permalink
Merge pull request #2754 from GreenAsJade/fix_uninitalised_already_re…
Browse files Browse the repository at this point in the history
…ported

Fix uninitialised `already_reported`
  • Loading branch information
anoek authored Jul 13, 2024
2 parents a4dd725 + 10ece33 commit e40df8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Report/Report.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,8 @@ export function openReport(report: ReportProperties): void {
// Instead, open the incident report list to show them their current report, which they can edit.
// (arguably we might let them report the "other" player as well as the already reported one,
// but that's a bit more complicated and not worth the effort for now.)
const already_reported = data.get("reported-games") as number[];
console.log("already_reported", already_reported, report.reported_game_id);
const already_reported = data.get("reported-games", []) as number[];

if (report.reported_game_id && already_reported.includes(report.reported_game_id)) {
data.set("ui-state.show_incident_list", true);
return;
Expand Down

0 comments on commit e40df8c

Please sign in to comment.