From c00798249fa47c8cf797917b20dddad7b6b71312 Mon Sep 17 00:00:00 2001 From: Matthew Glissmann Date: Thu, 12 Sep 2024 11:08:35 -0600 Subject: [PATCH] Ensure domNode is present before render (#174) --- grommet-leaflet/src/layers/MarkerCluster/MarkerCluster.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grommet-leaflet/src/layers/MarkerCluster/MarkerCluster.jsx b/grommet-leaflet/src/layers/MarkerCluster/MarkerCluster.jsx index a80d8ee..8329dcc 100644 --- a/grommet-leaflet/src/layers/MarkerCluster/MarkerCluster.jsx +++ b/grommet-leaflet/src/layers/MarkerCluster/MarkerCluster.jsx @@ -77,7 +77,7 @@ const MarkerCluster = props => { // Need to accomodate earlier versions of React. If <18, then // need to use ReactDOM.render() instead of createRoot().render(). // Should drop support for <18 in the future. - render(popupContent, domNode); + if (domNode) render(popupContent, domNode); // const root = createRoot(domNode); // root.render(popupContent); });