diff --git a/src/network/NetworkedMapAndTokens.js b/src/network/NetworkedMapAndTokens.js index 8d39b50..e056dc8 100644 --- a/src/network/NetworkedMapAndTokens.js +++ b/src/network/NetworkedMapAndTokens.js @@ -273,6 +273,9 @@ function NetworkedMapAndTokens({ session }) { */ async function handleMapTokenStateCreate(tokenState) { + if (!currentMap || !currentMapState) { + return; + } // If file type token send the token to the other peers const token = getToken(tokenState.tokenId); if (token && token.type === "file") {