From e65d8a470fbc66860133d0a24244849f81e48df2 Mon Sep 17 00:00:00 2001 From: Scott Anderson <662325+scottanderson@users.noreply.github.com> Date: Tue, 8 Jul 2025 16:31:30 -0400 Subject: [PATCH] bugfix: Crash during replay (#1375) ## Description: During local development, joining a game immediately after it ends to watch a replay results a crash. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors --- src/client/graphics/layers/ChatDisplay.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/graphics/layers/ChatDisplay.ts b/src/client/graphics/layers/ChatDisplay.ts index f6940ae0a..5a880f733 100644 --- a/src/client/graphics/layers/ChatDisplay.ts +++ b/src/client/graphics/layers/ChatDisplay.ts @@ -80,7 +80,7 @@ export class ChatDisplay extends LitElement implements Layer { tick() { // this.active = true; const updates = this.game.updatesSinceLastTick(); - if (updates === null) throw new Error("null updates"); + if (updates === null) return; const messages = updates[GameUpdateType.DisplayEvent] as | DisplayMessageUpdate[] | undefined;