From 177ad3decfa651f39c26230d4afcdb3c8fb784d7 Mon Sep 17 00:00:00 2001 From: Hamidreza Jahtalab Date: Fri, 12 Aug 2016 11:13:14 +0200 Subject: [PATCH] fix(browser): use XMLHttpRequest.DONE constant on target instead of the global interface fixes #394 --- lib/browser/browser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/browser/browser.ts b/lib/browser/browser.ts index 0ffb6ce95..82ffab5a0 100644 --- a/lib/browser/browser.ts +++ b/lib/browser/browser.ts @@ -55,7 +55,7 @@ function patchXHR(window: any) { function scheduleTask(task: Task) { var data = task.data; data.target.addEventListener('readystatechange', () => { - if (data.target.readyState === XMLHttpRequest.DONE) { + if (data.target.readyState === data.target.DONE) { if (!data.aborted) { task.invoke(); }