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