From 648041e0400525e960cdf3e1c4e5ce13afd403e7 Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Sat, 12 Sep 2026 22:37:32 -0700 Subject: [PATCH] fix: keep clear control alive when map controls are initialized --- src/sharelink.celestial.test.mjs | 1 + src/ui.js | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sharelink.celestial.test.mjs b/src/sharelink.celestial.test.mjs index dbfbf5fe2..5c1df1fc9 100644 --- a/src/sharelink.celestial.test.mjs +++ b/src/sharelink.celestial.test.mjs @@ -692,6 +692,7 @@ test('visual input listeners are revoked before asynchronous UI teardown', () => assert.match(synchronous, /this\._applicationShortcuts\?\.destroy\(\)/); assert.match(synchronous, /this\._visualEffects\.stop\(\)/); assert.match(synchronous, /this\._mapSourceControls\?\.destroy\(\)/); + assert.match(synchronous, /this\._clearLayersControl\?\.destroy\(\)/); assert.match(synchronous, /this\._displayControls\?\.destroy\(\)/); assert.match(synchronous, /this\._styleParameters\?\.destroy\(\)/); }); diff --git a/src/ui.js b/src/ui.js index 74c6c8386..9cee03d13 100644 --- a/src/ui.js +++ b/src/ui.js @@ -3331,7 +3331,6 @@ export class StyleManager { _initMapStackControl() { if (!this.mapStackController) return; this._mapSourceControls?.destroy(); - this._clearLayersControl?.destroy(); this._mapSourceControls = createMapSourceControls({ container: this._mapStackChips, statusElement: this._mapStackStatus,