diff --git a/src/tiles.js b/src/tiles.js index bf7aa97..68759fb 100644 --- a/src/tiles.js +++ b/src/tiles.js @@ -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) } })