The problem is when i set the value in the array from the each promise, the value not return when forEach finish in the array.
let works = [];
const imgsUrl = saveImages(imgs);
imgsUrl.map(async (img) => {
img.then(value => {
works = [...works, value];
})
});
Someone any idea, thanks by the way.