Relative Content

Tag Archive for javascriptasync-awaitpromise

Aync/await not waiting until the function is fully processed multiple forEach loops with Promise.all() [duplicate]

This question already has answers here: Using async/await with a forEach loop (35 answers) Closed 3 days ago. This post was edited and submitted for review 3 days ago. async function fnGetVehicleList(makeCode, responseModels){ let vehicleListData = []; await Promise.all(responseModels.Table.forEach(async (model) => { const vehicleDetailResponse = await getVehicleDetails(‘2024’,makeCode, model.Code); // API call. This is also an […]

Consider the last promise in a chain for Resolve.all

I want to export HTML content from Confluence pages. Those can contain <img> tags with src attributes that are just usual hyperlinks. Since I want to export those as well I decided to replace the src content to their corresponding data URLs, so that there is src="data:image/png;base64,AEFJEFEF…".