From 81da404eecf304381fd39b5eb15b391849b28149 Mon Sep 17 00:00:00 2001 From: Mitchell McCaffrey Date: Thu, 23 Apr 2020 21:20:06 +1000 Subject: [PATCH] Changed map and map state send order on sync --- src/routes/Game.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/routes/Game.js b/src/routes/Game.js index dca2556..db29ff0 100644 --- a/src/routes/Game.js +++ b/src/routes/Game.js @@ -159,12 +159,12 @@ function Game() { function handlePeerData({ data, peer }) { if (data.id === "sync") { - if (map) { - peer.connection.send({ id: "map", data: map }); - } if (mapState) { peer.connection.send({ id: "mapState", data: mapState }); } + if (map) { + peer.connection.send({ id: "map", data: map }); + } } if (data.id === "map") { // If we have a file convert it to a url