From f9cd7b5aa894267dc8fdb41359c798505ebf215e Mon Sep 17 00:00:00 2001 From: Yovarni Yearwood Date: Wed, 12 Mar 2025 13:11:26 -0400 Subject: [PATCH] Fix style loading check on Source layers (#2377) (#2493) Co-authored-by: Yovarni Yearwood --- modules/react-mapbox/src/components/source.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/react-mapbox/src/components/source.ts b/modules/react-mapbox/src/components/source.ts index 3139d61a..6dad8a8a 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;