Fix function usage, add workaround for a Bun bug
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone Build is passing
				
			This commit is contained in:
		
							
								
								
									
										5
									
								
								index.ts
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								index.ts
									
									
									
									
									
								
							| @@ -45,10 +45,11 @@ const getScreenshots = async function (resp: object, path: string): Promise<any> | ||||
| export default { | ||||
|     port: 3000, | ||||
|     async fetch(request: Request) { | ||||
|         await new Promise((r) => setTimeout(r, 1)); // https://github.com/oven-sh/bun/issues/1600 | ||||
|         let reqUrl = await parseUrl(request.url) | ||||
|         let req = await request.json(); | ||||
|         let promises = getScreenshots(req, reqUrl.path) | ||||
|         return Promise.all(promises).then((r) => { | ||||
|  | ||||
|         return Promise.all(await getScreenshots(req, reqUrl.path)).then((r) => { | ||||
|             let resp = Object.assign({}, req) | ||||
|             resp.screenshots = r | ||||
|             return resp | ||||
|   | ||||
		Reference in New Issue
	
	Block a user