Fix bug with map settings expand disabled

This commit is contained in:
Mitchell McCaffrey 2020-06-28 14:00:36 +10:00
parent 7a40e77de1
commit 7a3213a0f9

View File

@ -3,6 +3,8 @@ import { Flex, Box, Label, Input, Checkbox, IconButton } from "theme-ui";
import ExpandMoreIcon from "../../icons/ExpandMoreIcon";
import { isEmpty } from "../../helpers/shared";
import Divider from "../Divider";
function MapSettings({
@ -122,7 +124,7 @@ function MapSettings({
}}
aria-label={showMore ? "Show Less" : "Show More"}
title={showMore ? "Show Less" : "Show More"}
disabled={!map}
disabled={!map || isEmpty(map)}
>
<ExpandMoreIcon />
</IconButton>