From 9852b6805cea12247dca74cb036d7a4d213d43d8 Mon Sep 17 00:00:00 2001 From: Derick M <58572875+TurtIeSocks@users.noreply.github.com> Date: Mon, 23 Oct 2023 14:51:02 -0400 Subject: [PATCH] fix: clustering crashes --- src/components/Clustering.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Clustering.jsx b/src/components/Clustering.jsx index 4bdc7fef7..050ce86a4 100644 --- a/src/components/Clustering.jsx +++ b/src/components/Clustering.jsx @@ -97,7 +97,7 @@ function Clustering({ category, children }) { React.useEffect(() => { if (superCluster) { /** @type {import('geojson').Feature[]} */ - const features = children.map((reactEl) => ({ + const features = children.filter(Boolean).map((reactEl) => ({ type: 'Feature', id: reactEl?.key, properties: {},