fix: unregisterPrefPane
This commit is contained in:
		
							parent
							
								
									5b99dfe8ba
								
							
						
					
					
						commit
						dcf82a360f
					
				@ -148,9 +148,10 @@ class AddonUtils extends AddonModule {
 | 
				
			|||||||
        Services.wm.addListener(windowListener);
 | 
					        Services.wm.addListener(windowListener);
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      unregisterPrefPane: () => {
 | 
					      unregisterPrefPane: () => {
 | 
				
			||||||
        this.Compat.prefPaneCache.listeners.forEach((l) =>
 | 
					        this.Compat.prefPaneCache.listeners.forEach((l) => {
 | 
				
			||||||
          Services.wm.removeListener(l)
 | 
					          Services.wm.removeListener(l);
 | 
				
			||||||
        );
 | 
					          l.onOpenWindow = undefined;
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
        const win = this.Compat.prefPaneCache.win;
 | 
					        const win = this.Compat.prefPaneCache.win;
 | 
				
			||||||
        if (win && !win.closed) {
 | 
					        if (win && !win.closed) {
 | 
				
			||||||
          this.Compat.prefPaneCache.ids.forEach((id) =>
 | 
					          this.Compat.prefPaneCache.ids.forEach((id) =>
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user