Skip to content

Commit

Permalink
Fixed attempt of buckets update before map first render (#13377)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
msereniti authored Jan 2, 2025
1 parent 5c1af30 commit f03200d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/source/tile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,7 @@ class Tile {

updateBuckets(painter: Painter, isBrightnessChanged?: boolean) {
if (!this.latestFeatureIndex) return;
if (!painter.style) return;

const vtLayers = this.latestFeatureIndex.loadVTLayers();
const availableImages = painter.style.listImages();
Expand Down

0 comments on commit f03200d

Please sign in to comment.