Skip to content

Commit d4f7aaf

Browse files
committed
Cleanup error handling
1 parent 324e537 commit d4f7aaf

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

ui/src/game/create/CreateGame.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,10 @@ export default function CreateGame() {
2424
};
2525

2626
const saveGameToFile = () => {
27-
if (request.rounds.length <= 0) {
28-
console.log("not enough saved rounds");
29-
alert("No rounds to save to file");
30-
return;
31-
}
3227
const jsonString = `data:text/json;charset=utf-8,${encodeURIComponent(JSON.stringify(request))}`;
3328
const link = document.createElement("a");
3429
link.href = jsonString;
35-
link.download = username + "-open-trivia-night-game.json";
30+
link.download = `${username}-open-trivia-night-game.json`;
3631

3732
link.click();
3833
};

0 commit comments

Comments
 (0)