Skip to content

Commit bbe42a9

Browse files
fix: prevent clearFadeHold undefined error
1 parent cac98e0 commit bbe42a9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/source/source_cache.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,9 @@ export class SourceCache extends Evented {
676676
for (const retainedId in retain) {
677677
// Make sure retained tiles always clear any existing fade holds
678678
// so that if they're removed again their fade timer starts fresh.
679-
this._tiles[retainedId].clearFadeHold();
679+
if (this._tiles[retainedId]) {
680+
this._tiles[retainedId].clearFadeHold();
681+
}
680682
}
681683

682684
// Remove the tiles we don't need anymore.

0 commit comments

Comments
 (0)