From c23c332ccb57993ba2dce56cd89c2795a544595b Mon Sep 17 00:00:00 2001 From: evanpelle Date: Sun, 9 Mar 2025 19:30:32 -0700 Subject: [PATCH] only compare archived hash if not null/undefined (#198) --- src/client/LocalServer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/LocalServer.ts b/src/client/LocalServer.ts index 3fc6e6b47..3f8fdba09 100644 --- a/src/client/LocalServer.ts +++ b/src/client/LocalServer.ts @@ -96,7 +96,7 @@ export class LocalServer { return; } const archivedHash = this.turns[clientMsg.turnNumber].hash; - if (archivedHash != clientMsg.hash) { + if (archivedHash && archivedHash != clientMsg.hash) { console.warn( `desync detected on turn ${clientMsg.turnNumber}, client hash: ${clientMsg.hash}, server hash: ${archivedHash}`, );