File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -226,8 +226,8 @@ export class AppState {
226226    } ) ; 
227227  } 
228228
229-   // Lock  on the active Electron version that prevents other windows from removing it 
230-   private  versionLock :  Lock   |   null   =   null ; 
229+   // Do we have a lock  on the active Electron version that prevents other windows from removing it?  
230+   private  hasActiveLock   =   false ; 
231231
232232  // Used to release the lock when the current window switches Electron versions 
233233  private  versionLockController  =  new  AbortController ( ) ; 
@@ -989,7 +989,7 @@ export class AppState {
989989      return ; 
990990    } 
991991
992-     if  ( this . versionLock )  { 
992+     if  ( this . hasActiveLock )  { 
993993      console . log ( `Releasing lock on version ${ this . version }  ` ) ; 
994994
995995      // release the lock on the previous version 
@@ -1007,7 +1007,7 @@ export class AppState {
10071007      this . getVersionLockName ( version ) , 
10081008      {  mode : 'shared'  } , 
10091009      ( lock )  =>  { 
1010-         this . versionLock  =  lock ; 
1010+         this . hasActiveLock  =  Boolean ( lock ) ; 
10111011
10121012        /** 
10131013         * The lock is released when this promise resolves, so we keep it in the 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments