From 3b4c20ba6c695c535aff86b1ec47f03b33049e67 Mon Sep 17 00:00:00 2001 From: jahtalab Date: Mon, 22 Aug 2016 18:31:30 +0200 Subject: [PATCH] fix(browser): use XMLHttpRequest.DONE constant on target instead of the global interface (#395) 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(); }