Skip to content

Commit f03200d

Browse files
authored
Fixed attempt of buckets update before map first render (#13377)
As `Painter.style` property is being initialized in the `render` method instead of `constructor`, it seems that `updateBuckets` might be occasionally called even before the first map render when the painter is not ready to do their job.
1 parent 5c1af30 commit f03200d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/source/tile.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,7 @@ class Tile {
615615

616616
updateBuckets(painter: Painter, isBrightnessChanged?: boolean) {
617617
if (!this.latestFeatureIndex) return;
618+
if (!painter.style) return;
618619

619620
const vtLayers = this.latestFeatureIndex.loadVTLayers();
620621
const availableImages = painter.style.listImages();

0 commit comments

Comments
 (0)