We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ebef8fe commit 03b32dbCopy full SHA for 03b32db
spotlight-client/src/charts/TopologicalMap/Region.tsx
@@ -17,7 +17,7 @@
17
18
import { geoCentroid } from "d3-geo";
19
import React, { useState } from "react";
20
-import { Geography, Marker, GeographyProps } from "react-simple-maps";
+import { Geography, GeographyProps, Marker } from "react-simple-maps";
21
import { Spring } from "react-spring/renderprops.cjs";
22
import styled from "styled-components/macro";
23
import { ValuesType } from "utility-types";
@@ -50,7 +50,7 @@ const Region = ({
50
geography: GeographyProps["geography"];
51
}): React.ReactElement => {
52
const centroid = geoCentroid(geography);
53
- const { label, value } = data;
+ const { label, value } = data || {};
54
const [hoverRegion, setHoverRegion] = useState(false);
55
56
const setHover = () => {
0 commit comments