for the below posted code, i would like to know why:
.then(async (promisesForTS1) => {
return await Promise.all(promisesForTS1);
})
does not get executed?
code:
await Promise.all([
new Promise((resolve, reject) => {
for (let i = 0; i < bandsDataForTS1.length; i++) {
const contents = bandsDataForTS1[i].contents;
const promise = TIFFUtils.bandContentsToBlob(contents)
.then(res => {
const asBlob = res[0];
const asURL = res[1];
asBlobsForTS1.push(asBlob);
asURLsForTS1.push(asURL);
});
promisesForTS1.push(promise);
}
resolve(promisesForTS1)
})
.then(async (promisesForTS1) => {
return await Promise.all(promisesForTS1);
})
]);