mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 02:44:02 +00:00
fix(maps): stop delivering settled state to detached subscribers
This commit is contained in:
1 parent
0265ad4c19
commit
5889d35327
4 files changed
+62
No files matched your search
@@ -142,6 +142,7 @@ export class MapSourceController {
|
||||
if (this._destroyed || !this._subscribers.size) return;
|
||||
const state = this.getState();
|
||||
for (const listener of [...this._subscribers]) {
|
||||
if (this._destroyed || !this._subscribers.has(listener)) continue;
|
||||
try {
|
||||
listener(state);
|
||||
} catch (error) {
|
||||
|
||||
Reference in new issue
Block a user