cferdinandi / atomic

A tiny, Promise-based vanilla JS Ajax/HTTP plugin with great browser support.
MIT License
540 stars 78 forks source link

[fix #77] prevent timeout errors from being processed in the .onreadystat… #78

Closed Hiro-Nakamura closed 4 years ago

Hiro-Nakamura commented 4 years ago

…echange()

on a timeout, the onreadystatechange() will be processed before the .ontimeout() handler. So we need to prevent the onreadystatechange() from responding to a timeout error (where response.state == 0).

cferdinandi commented 4 years ago

Awesome, thanks for this!