Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mpulkki-mapbox committed Dec 17, 2019
1 parent a608d3f commit d0dd0e4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/source/source_cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -650,10 +650,10 @@ class SourceCache extends Evented {
_updateLoadedParentTileCache() {
this._loadedParentTiles = {};

for (const tile of (Object.values(this._tiles): any)) {
for (const tileKey in this._tiles) {
const path = [];
let parentTile: ?Tile;
let currentId = tile.tileID;
let currentId = this._tiles[tileKey].tileID;

// Find the closest loaded ancestor by traversing the tile tree towards the root and
// caching results along the way
Expand All @@ -678,8 +678,8 @@ class SourceCache extends Evented {
}

// Cache the result of this traversal to all newly visited tiles
for (let i = 0; i < path.length; i++) {
this._loadedParentTiles[path[i]] = parentTile;
for (const key of path) {
this._loadedParentTiles[key] = parentTile;
}
}
}
Expand Down

0 comments on commit d0dd0e4

Please sign in to comment.