If theres an error remove the sync listener
This commit is contained in:
		
					parent
					
						
							
								99374bbe00
							
						
					
				
			
			
				commit
				
					
						3df1f89f06
					
				
			
		
					 1 changed files with 1 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -25,6 +25,7 @@ function waitForSync(client) {
 | 
			
		|||
        client.removeListener("sync", onSync);
 | 
			
		||||
      } else if (state === "ERROR") {
 | 
			
		||||
        reject(data?.error);
 | 
			
		||||
        client.removeListener("sync", onSync);
 | 
			
		||||
      }
 | 
			
		||||
    };
 | 
			
		||||
    client.on("sync", onSync);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue