diff --git a/modules/react-mapbox/src/components/source.ts b/modules/react-mapbox/src/components/source.ts index 3139d61a7..6dad8a8ab 100644 --- a/modules/react-mapbox/src/components/source.ts +++ b/modules/react-mapbox/src/components/source.ts @@ -26,7 +26,7 @@ let sourceCounter = 0; function createSource(map: MapInstance, id: string, props: SourceProps) { // @ts-ignore - if (map.style && map.style._loaded) { + if (map.isStyleLoaded()) { const options = {...props}; delete options.id; delete options.children;