Removed strict null check from map and mapState

This commit is contained in:
Mitchell McCaffrey 2021-01-23 00:01:15 +11:00
parent cee3514e71
commit 493377233c

View File

@ -428,19 +428,19 @@ function NetworkedMapAndTokens({ session }) {
const canChangeMap = !isLoading;
const canEditMapDrawing =
currentMap !== null &&
currentMapState !== null &&
currentMap &&
currentMapState &&
(currentMapState.editFlags.includes("drawing") ||
currentMap.owner === userId);
const canEditFogDrawing =
currentMap !== null &&
currentMapState !== null &&
currentMap &&
currentMapState &&
(currentMapState.editFlags.includes("fog") || currentMap.owner === userId);
const canEditNotes =
currentMap !== null &&
currentMapState !== null &&
currentMap &&
currentMapState &&
(currentMapState.editFlags.includes("notes") ||
currentMap.owner === userId);
@ -448,8 +448,8 @@ function NetworkedMapAndTokens({ session }) {
// If we have a map and state and have the token permission disabled
// and are not the map owner
if (
currentMapState !== null &&
currentMap !== null &&
currentMapState &&
currentMap &&
!currentMapState.editFlags.includes("tokens") &&
currentMap.owner !== userId
) {