fix(search): cancel active lookup when controls are disposed

This commit is contained in:
Sameh Khamis committed 2026-09-12 15:48:47 -07:00
1 parent eec4dd5cdb
commit 3263fe6ff1
4 files changed
+11 -2

No files matched your search

+1 -1
View File
@@ -4236,7 +4236,6 @@ export class StyleManager {
};
if (panelId === 'control-panel') {
this._cancelMapSourceFocus?.();
this._locationSearchController?.abort();
this._cancelMapSourceFocus = cancelMapSourceFocus;
}
@@ -10319,6 +10318,7 @@ export class StyleManager {
this._globalStatusNotice = null;
if (this._globalLoadingStatus) this._globalLoadingStatus.hidden = true;
this._disposed = true;
this._locationSearchController?.abort();
this._cancelMapSourceFocus?.();
// Revoke persistence/hash authority before teardown can emit manager changes.
this._layerStateCoordinator?.destroy();