Skip to content

Commit

Permalink
more resilient paint check in setFeatureState (#9472)
Browse files Browse the repository at this point in the history
  • Loading branch information
mourner authored Mar 27, 2020
1 parent 180da93 commit 8c8ffb0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/source/tile.js
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,8 @@ class Tile {
if (!sourceLayer || !sourceLayerStates || Object.keys(sourceLayerStates).length === 0) continue;

bucket.update(sourceLayerStates, sourceLayer, this.imageAtlas && this.imageAtlas.patternPositions || {});
const layer = painter.style.getLayer(id);
if (painter && painter.style && layer.paint) {
const layer = painter && painter.style && painter.style.getLayer(id);
if (layer && layer.paint) {
this.queryPadding = Math.max(this.queryPadding, layer.queryRadius(bucket));
}
}
Expand Down

0 comments on commit 8c8ffb0

Please sign in to comment.