mirror of
				https://github.com/Foundry376/Mailspring.git
				synced 2025-10-31 00:16:58 +08:00 
			
		
		
		
	[client-sync] Correctly remove sync worker reference when destroying it
Summary: By nullifying the key inside `workersByAccountId` we would attempt to access accountIds that no longer existed in other parts of the code by using Object.keys() This makes it so we correctly completely remove the record from the map Test Plan: manual Reviewers: halla, spang, mark Reviewed By: mark Differential Revision: https://phab.nylas.com/D4426
This commit is contained in:
		
							parent
							
								
									c6f7a862c9
								
							
						
					
					
						commit
						373eb9651b
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -173,7 +173,7 @@ class SyncProcessManager { | |||
|   async removeWorkerForAccountId(accountId, {timeout} = {}) { | ||||
|     if (this._workersByAccountId[accountId]) { | ||||
|       await this._workersByAccountId[accountId].destroy({timeout}) | ||||
|       this._workersByAccountId[accountId] = null; | ||||
|       delete this._workersByAccountId[accountId]; | ||||
|     } | ||||
| 
 | ||||
|     if (this._localSyncDeltaEmittersByAccountId.has(accountId)) { | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue