Explorar o código

fix issue when fetching empty resources

Gildas %!s(int64=3) %!d(string=hai) anos
pai
achega
e63ec0d930
Modificáronse 1 ficheiros con 1 adicións e 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,