Fix style loading check on Source layers (#2377) (#2493)

Co-authored-by: Yovarni Yearwood <yovarni@hawser.org>
This commit is contained in:
Yovarni Yearwood 2025-03-12 13:11:26 -04:00 committed by GitHub
parent 89af36b53a
commit f9cd7b5aa8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;