mirror of
https://github.com/visgl/react-map-gl.git
synced 2026-01-18 15:54:22 +00:00
Make supported() check optional (#2179)
This commit is contained in:
parent
51a6a2c8f1
commit
2244babaae
@ -63,7 +63,7 @@ function Map(props: MapProps, ref: React.Ref<MapRef>) {
|
||||
// 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);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user