Fixed sending empty map bug when double clicking the delete map button
Also fixed default map resolution sending to peers
This commit is contained in:
parent
bd9ea18572
commit
17c2205e07
@ -64,6 +64,11 @@ function NetworkedMapAndTokens({ session }) {
|
||||
setCurrentMapState(newMapState);
|
||||
setCurrentMap(newMap);
|
||||
session.send("map", null, "map");
|
||||
|
||||
if (!newMap || !newMapState) {
|
||||
return;
|
||||
}
|
||||
|
||||
session.send("mapState", newMapState);
|
||||
session.send("map", getMapDataToSend(newMap), "map");
|
||||
const tokensToSend = getMapTokensToSend(newMapState);
|
||||
@ -252,7 +257,7 @@ function NetworkedMapAndTokens({ session }) {
|
||||
if (id === "mapRequest") {
|
||||
const map = getMap(data);
|
||||
function replyWithFile(file) {
|
||||
reply("mapResponse", { ...map, file, resolutions: [] }, "map");
|
||||
reply("mapResponse", { ...map, file, resolutions: {} }, "map");
|
||||
}
|
||||
|
||||
switch (map.quality) {
|
||||
|
Loading…
Reference in New Issue
Block a user