Skip to content

Commit df0e7a7

Browse files
committed
bug: closing a map will remove its WebGL context (#73).
1 parent 7fd63ac commit df0e7a7

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/flatmap.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,6 +1300,8 @@ export class FlatMap
13001300
//=====
13011301
{
13021302
if (this.#map) {
1303+
// Set before calling `remove()` to avoid a race...
1304+
this.#contextLost = true
13031305
this.#map.remove()
13041306
this.#map = null
13051307
}

0 commit comments

Comments
 (0)