From 2244babaae5f3aecf166357713d489d56e6faaaf Mon Sep 17 00:00:00 2001 From: Xiaoji Chen Date: Wed, 24 May 2023 08:55:53 -0700 Subject: [PATCH] Make supported() check optional (#2179) --- src/components/map.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/map.tsx b/src/components/map.tsx index 8741d11f..b64bd42c 100644 --- a/src/components/map.tsx +++ b/src/components/map.tsx @@ -63,7 +63,7 @@ function Map(props: MapProps, ref: React.Ref) { // workerUrl & workerClass may change the result of supported() // https://github.com/visgl/react-map-gl/discussions/2027 setGlobals(mapboxgl, props); - if (mapboxgl.supported(props)) { + if (!mapboxgl.supported || mapboxgl.supported(props)) { if (props.reuseMaps) { mapbox = Mapbox.reuse(props, containerRef.current); }