Gildas 7 лет назад
Родитель
Сommit
c8955f414f
1 измененных файлов с 3 добавлено и 4 удалено
  1. 3 4
      lib/single-file/single-file-core.js

+ 3 - 4
lib/single-file/single-file-core.js

@@ -730,14 +730,13 @@ this.SingleFileCore = this.SingleFileCore || (() => {
 					if (frameWindowId) {
 						const frameData = this.options.framesData.find(frame => frame.windowId == frameWindowId);
 						if (frameData) {
-							await initializeProcessor(frameData, frameElement, frameWindowId);
+							await initializeProcessor(frameData, frameElement, frameWindowId, this.batchRequest, Object.create(this.options));
 						}
 					}
 				}));
 			}
 
-			async function initializeProcessor(frameData, frameElement, frameWindowId) {
-				const options = Object.create(this.options);
+			async function initializeProcessor(frameData, frameElement, frameWindowId, batchRequest, options) {
 				options.insertSingleFileComment = false;
 				options.insertFaviconLink = false;
 				options.doc = null;
@@ -757,7 +756,7 @@ this.SingleFileCore = this.SingleFileCore || (() => {
 					frameData.frameElement = frameElement;
 					await frameData.processor.loadPage();
 					await frameData.processor.initialize();
-					frameData.maxResources = this.batchRequest.getMaxResources();
+					frameData.maxResources = batchRequest.getMaxResources();
 				}
 			}
 		}