Explorar el Código

fix issue when fetching empty resources

Gildas hace 3 años
padre
commit
e63ec0d930
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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,