Sfoglia il codice sorgente

fix issue when fetching empty resources

Gildas 3 anni fa
parent
commit
e63ec0d930
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      src/extension/lib/single-file/fetch/bg/fetch.js

+ 1 - 1
src/extension/lib/single-file/fetch/bg/fetch.js

@@ -56,7 +56,7 @@ async function onRequest(message, sender) {
 }
 
 async function sendResponse(tabId, requestId, response) {
-	for (let blockIndex = 0; blockIndex * MAX_CONTENT_SIZE < response.array.length; blockIndex++) {
+	for (let blockIndex = 0; blockIndex * MAX_CONTENT_SIZE <= response.array.length; blockIndex++) {
 		const message = {
 			method: "singlefile.fetchResponse",
 			requestId,