Fix bug with sending low resolution maps

This commit is contained in:
Mitchell McCaffrey 2020-07-17 15:02:21 +10:00
parent 00ba1a5fc1
commit d83c6e80fb
2 changed files with 10 additions and 3 deletions

View File

@ -19,9 +19,12 @@ function MapTile({
}) {
const [isMapTileMenuOpen, setIsTileMenuOpen] = useState(false);
const isDefault = map.type === "default";
const mapSource = useDataSource(
isDefault ? map : map.resolutions.low ? map.resolutions.low : map,
isDefault
? map
: map.resolutions && map.resolutions.low
? map.resolutions.low
: map,
defaultMapSources,
unknownSource
);

View File

@ -269,7 +269,11 @@ function NetworkedMapAndTokens({ session }) {
replyWithFile(map.resolutions.ultra.file);
break;
case "original":
if (map.resolutions.medium) {
replyWithFile(map.resolutions.medium.file);
} else if (map.resolutions.low) {
replyWithFile(map.resolutions.low.file);
}
replyWithFile(map.file);
break;
default: