only compare archived hash if not null/undefined (#198)

This commit is contained in:
evanpelle
2025-03-09 19:30:32 -07:00
committed by GitHub
parent 61cfe7102c
commit c23c332ccb
+1 -1
View File
@@ -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}`,
);