Ver Fonte

use native `fetch`

Gildas há 1 ano atrás
pai
commit
befb90bec6
1 ficheiros alterados com 1 adições e 3 exclusões
  1. 1 3
      src/lib/single-file/fetch/content/content-fetch.js

+ 1 - 3
src/lib/single-file/fetch/content/content-fetch.js

@@ -30,9 +30,7 @@ const FETCH_RESPONSE_EVENT = "single-file-response-fetch";
 const ERR_HOST_FETCH = "Host fetch error (SingleFile)";
 const USE_HOST_FETCH = Boolean(window.wrappedJSObject);
 
-const fetch = (url, options) => {
-	return window.fetch(url, options);
-};
+const fetch = window.fetch.bind(window);
 
 let requestId = 0, pendingResponses = new Map(), hostFetchSupported;