diff --git a/src/hooks/usePolygon.js b/src/hooks/usePolygon.js index fd5b5a69..ccb8f60a 100644 --- a/src/hooks/usePolygon.js +++ b/src/hooks/usePolygon.js @@ -176,6 +176,10 @@ export const usePolygon = () => { * @param showDirectionText */ const drawDirectionArrow = (polygon, showDirectionText = true) => { + if (!polygon) { + return + } + if (polygon.points.length < 3) { return }