Sfoglia il codice sorgente

remove src from missed iframes

Former-commit-id: 518308180de76dba9999c1ec3701ea8fbe127581
Gildas 5 anni fa
parent
commit
25a44b6b87
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      lib/single-file/single-file-core.js

+ 2 - 2
lib/single-file/single-file-core.js

@@ -949,7 +949,7 @@ this.singlefile.lib.core = this.singlefile.lib.core || (() => {
 		}
 
 		async resolveFrameURLs() {
-			if (!this.options.saveRawPage && this.options.frames) {
+			if (!this.options.saveRawPage) {
 				const frameElements = Array.from(this.doc.querySelectorAll("iframe, frame, object[type=\"text/html\"][data]"));
 				await Promise.all(frameElements.map(async frameElement => {
 					if (frameElement.tagName == "OBJECT") {
@@ -960,7 +960,7 @@ this.singlefile.lib.core = this.singlefile.lib.core || (() => {
 					}
 					Array.from(frameElement.childNodes).forEach(node => node.remove());
 					const frameWindowId = frameElement.getAttribute(util.WIN_ID_ATTRIBUTE_NAME);
-					if (frameWindowId) {
+					if (this.options.frames && frameWindowId) {
 						const frameData = this.options.frames.find(frame => frame.windowId == frameWindowId);
 						if (frameData) {
 							await initializeProcessor(frameData, frameElement, frameWindowId, this.batchRequest, Object.create(this.options));