[Glitch] Fix regression in “Edit media” modal in web UI
Port 90f3a0006243250ced6e7e192f81513d6b731b33 to glitch-soc Signed-off-by: Thibaut Girka <thib@sitedethib.com>
This commit is contained in:
		
							parent
							
								
									912f4a2eba
								
							
						
					
					
						commit
						0ff78befc6
					
				@ -274,7 +274,7 @@ export function uploadCompose(files) {
 | 
			
		||||
            const poll = () => {
 | 
			
		||||
              api(getState).get(`/api/v1/media/${data.id}`).then(response => {
 | 
			
		||||
                if (response.status === 200) {
 | 
			
		||||
                  dispatch(uploadComposeSuccess(data, f));
 | 
			
		||||
                  dispatch(uploadComposeSuccess(response.data, f));
 | 
			
		||||
                } else if (response.status === 206) {
 | 
			
		||||
                  setTimeout(() => poll(), 1000);
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user