下面的方法返回下面屏幕截图中的对象。有人可以帮助我理解为什么我会返回未定义的值吗?
async creditsCall() {
const credits: any[] = this.myForm.controls.credits.value
const responses = await Promise.allSettled(
credits.map(async credit => {
const res = await fetch(
'https://api.themoviedb.org/3/discover/movie?api_key=434577a472bbcc4c3d3154c77dd71ace&language=en-US&sort_by=popularity.desc&include_adult=false&include_video=false&page=1&with_cast=' + credit + '&with_watch_monetization_types=flatrate'
);
})
)
console.log(responses)
}
返回数组的屏幕截图。