Skip to content

Commit

Permalink
cleaner
Browse files Browse the repository at this point in the history
  • Loading branch information
Shane98c committed Feb 14, 2024
1 parent 757f8b1 commit 7ce2389
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -403,9 +403,9 @@ export const createTiles = (regl, opts) => {
tileIndex[0],
tileIndex[1]
)
if (!this.tiles[key]?.hasLoadedChunks(chunks)) {
if (this.tiles[key] && !this.tiles[key].hasLoadedChunks(chunks)) {
const loadingID = this.setLoading('chunk')
await this.tiles[key]?.loadChunks(chunks)
await this.tiles[key].loadChunks(chunks)
this.clearLoading(loadingID)
}
})
Expand Down

0 comments on commit 7ce2389

Please sign in to comment.