Skip to content

Commit

Permalink
fix(core): 🏁 fix InvalidStateError on IE
Browse files Browse the repository at this point in the history
  • Loading branch information
thierrymichel committed Apr 1, 2019
1 parent 952c670 commit b9eece9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/utils/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ function request(
return new Promise((resolve, reject) => {
const xhr = new XMLHttpRequest();

xhr.timeout = ttl;
xhr.onreadystatechange = () => {
if (xhr.readyState === XMLHttpRequest.DONE) {
if (xhr.status === 200) {
Expand Down Expand Up @@ -56,6 +55,7 @@ function request(
};

xhr.open('GET', url);
xhr.timeout = ttl;
xhr.setRequestHeader(
'Accept',
'text/html,application/xhtml+xml,application/xml'
Expand Down

0 comments on commit b9eece9

Please sign in to comment.