Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
fix(browser): use XMLHttpRequest.DONE constant on target instead of t…
Browse files Browse the repository at this point in the history
…he global interface

fixes #394
  • Loading branch information
hmdhk committed Aug 20, 2016
1 parent 2d4ff65 commit 177ad3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/browser/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function patchXHR(window: any) {
function scheduleTask(task: Task) {
var data = <XHROptions>task.data;
data.target.addEventListener('readystatechange', () => {
if (data.target.readyState === XMLHttpRequest.DONE) {
if (data.target.readyState === data.target.DONE) {
if (!data.aborted) {
task.invoke();
}
Expand Down

0 comments on commit 177ad3d

Please sign in to comment.