File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed
Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -26,9 +26,11 @@ class ExtensionManager {
2626 return false ; // Don't keep channel open
2727 } ) ;
2828 }
29-
29+
3030 await this . loadCoreCSS ( ) ;
31-
31+
32+ this . cleanupOrphanedPanels ( ) ;
33+
3234 this . initialized = true ;
3335 }
3436
@@ -95,8 +97,8 @@ class ExtensionManager {
9597 }
9698
9799 cleanupOrphanedPanels ( ) {
98- // Remove any orphaned panels from DOM
99- const orphanedPanels = this . panels . get ( '.cv-panel' ) ;
100+ // Remove any orphaned panels from DOM that aren't tracked in our map
101+ const orphanedPanels = document . querySelectorAll ( '.cv-panel' ) ;
100102 orphanedPanels . forEach ( panel => {
101103 panel . remove ( ) ;
102104 } ) ;
@@ -140,13 +142,12 @@ class ExtensionManager {
140142 panel . hideImmediate ( ) ;
141143 }
142144 }
145+
146+ // Clear the panels map
143147 this . panels . clear ( ) ;
144148
145149 // Also remove any orphaned panels from DOM
146- const existingPanels = this . panels . get ( '.cv-panel' ) ;
147- existingPanels . forEach ( panel => {
148- panel . remove ( ) ;
149- } ) ;
150+ this . cleanupOrphanedPanels ( ) ;
150151 }
151152
152153 // TODO: Assessment workflow methods will be added later
You can’t perform that action at this time.
0 commit comments