From 7ce238978515d4291f6ecb8b3879a52f223780fa Mon Sep 17 00:00:00 2001 From: Shane Loeffler Date: Wed, 14 Feb 2024 12:27:31 -0600 Subject: [PATCH] cleaner --- src/tiles.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) } })