Skip to content

Commit 1d8625d

Browse files
committed
games: Fix non-ChatError error propagation
1 parent d44744d commit 1d8625d

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/ps/commands/games/core.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ export const command: PSCommand[] = Object.entries(Games).map(([_gameId, Game]):
205205
// Regenerate the HTML if given an invalid input
206206
if (err instanceof ChatError) {
207207
game.update(message.author.id);
208-
throw err;
209208
}
209+
throw err;
210210
}
211211
},
212212
},

src/ps/games/game.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,8 +432,8 @@ export class Game<State extends BaseState> {
432432
};
433433
uploadGame(model)
434434
.then(() => {
435-
const replay = this.getURL()!;
436-
this.room.send(replay as NoTranslate);
435+
const replay = this.getURL();
436+
if (replay) this.room.send(replay as NoTranslate);
437437
})
438438
.catch(err => {
439439
log(err);

0 commit comments

Comments
 (0)