Home  >  Q&A  >  body text

javascript - All promises return to resolved status. Why is promise.all still not executed?

I think it may be because I defined getData globally, so the promise cannot get the status.
Otherwise, why are the functions in the failure state of promise.all not executed?
I hope Daniel can help me answer this question.

習慣沉默習慣沉默2665 days ago1205

reply all(1)I'll reply

  • 巴扎黑

    巴扎黑2017-07-05 10:43:33

    Because every time the Jsonp function is executed, your window.getData will be redefined and assigned a value

    reply
    0
  • Cancelreply