diff --git a/www/js/components/LeafletView.tsx b/www/js/components/LeafletView.tsx index ce719272f..978028dac 100644 --- a/www/js/components/LeafletView.tsx +++ b/www/js/components/LeafletView.tsx @@ -80,7 +80,6 @@ const LeafletView = ({ geojson, opts, downscaleTiles, cacheHtml, ...otherProps } // After a Leaflet map is rendered, cache the map to reduce the cost for creating a map const mapHTMLElements = document.getElementById(mapElId); leafletCache.set(mapElId, mapHTMLElements?.innerHTML); - leafletMapRef.current?.remove(); }); } }, [geojson, cacheHtml]); @@ -154,7 +153,9 @@ const LeafletView = ({ geojson, opts, downscaleTiles, cacheHtml, ...otherProps } dangerouslySetInnerHTML={ /* this is not 'dangerous' here because the content is not user-generated; it's just an HTML string that we cached from a previous render */ - cacheHtml && leafletCache.has(mapElId) ? { __html: leafletCache.get(mapElId) } : undefined + cacheHtml && leafletCache?.has(mapElId) + ? { __html: leafletCache.get(mapElId) } + : undefined } /> diff --git a/www/js/survey/enketo/EnketoModal.tsx b/www/js/survey/enketo/EnketoModal.tsx index 768fcd0d1..f8b503407 100644 --- a/www/js/survey/enketo/EnketoModal.tsx +++ b/www/js/survey/enketo/EnketoModal.tsx @@ -108,17 +108,20 @@ const EnketoModal = ({ surveyName, onResponseSaved, opts, ...rest }: Props) => { validateAndSave()} style={{ width: 200, margin: 'auto' }}> - + {/* */} - - + + {/* */}
{t('survey.powered-by')}{' '}