소스 검색

defer call to resolveResponse

Gildas 7 년 전
부모
커밋
2c5ab5d3a9
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      lib/fetch/content/fetch.js

+ 1 - 1
lib/fetch/content/fetch.js

@@ -52,7 +52,7 @@ this.superFetch = this.superFetch || (() => {
 					resolve({ headers, status: xhrRequest.status, arrayBuffer: () => new Promise((resolve, reject) => [resolveResponse, rejectResponse] = [resolve, reject]) });
 				}
 				if (xhrRequest.readyState == XMLHttpRequest.DONE) {
-					resolveResponse(xhrRequest.response);
+					setTimeout(() => resolveResponse(xhrRequest.response), 1);
 				}
 			};
 			xhrRequest.onerror = error => {