Fix bug with adding tokens when no map is selected

This commit is contained in:
Mitchell McCaffrey 2021-01-21 11:29:39 +11:00
parent e892661016
commit ddf3a6daed

View File

@ -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") {