Fix unable to find owner toast appearing if map is cached
This commit is contained in:
parent
014cd553d1
commit
3577938501
@ -144,10 +144,15 @@ function NetworkedMapAndTokens({ session }) {
|
|||||||
const owner = Object.values(partyState).find(
|
const owner = Object.values(partyState).find(
|
||||||
(player) => player.userId === asset.owner
|
(player) => player.userId === asset.owner
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!owner) {
|
if (!owner) {
|
||||||
|
// Add no owner toast if asset is a map and we don't have it in out cache
|
||||||
if (asset.type === "map") {
|
if (asset.type === "map") {
|
||||||
|
const cachedMap = await getMapFromDB(asset.id);
|
||||||
|
if (!cachedMap) {
|
||||||
addToast("Unable to find owner for map");
|
addToast("Unable to find owner for map");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user