Skip to content

Commit f9cd7b5

Browse files
InpacchiYovarni Yearwood
andauthored
Fix style loading check on Source layers (#2377) (#2493)
Co-authored-by: Yovarni Yearwood <[email protected]>
1 parent 89af36b commit f9cd7b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/react-mapbox/src/components/source.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ let sourceCounter = 0;
2626

2727
function createSource(map: MapInstance, id: string, props: SourceProps) {
2828
// @ts-ignore
29-
if (map.style && map.style._loaded) {
29+
if (map.isStyleLoaded()) {
3030
const options = {...props};
3131
delete options.id;
3232
delete options.children;

0 commit comments

Comments
 (0)