Skip to content
This repository was archived by the owner on Mar 16, 2019. It is now read-only.

Commit 08f8403

Browse files
committed
Fixed a bug which causes XMLHttpRequest getting incorrect header when sending multiple requests in the same time
1 parent 40efd14 commit 08f8403

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

polyfill/XMLHttpRequest.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ export default class XMLHttpRequest extends XMLHttpRequestEventTarget{
277277
_headerReceived = (e) => {
278278
log.debug('header received ', this._task.taskId, e)
279279
this.responseURL = this._url
280-
if(e.state === "2") {
280+
if(e.state === "2" && e.taskId === this._task.taskId) {
281281
this._responseHeaders = e.headers
282282
this._statusText = e.status
283283
this._status = Math.floor(e.status)

0 commit comments

Comments
 (0)