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

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

@@ -466,7 +466,7 @@ this.SingleFileCore = this.SingleFileCore || (() => {
 			if (this.options.win) {
 				this.doc.body.querySelectorAll(":not(svg) title, meta, link[href][rel*=\"icon\"]").forEach(element => element instanceof this.options.win.HTMLElement && this.doc.head.appendChild(element));
 			}
-			if (this.options.imageData) {
+			if (this.options.imageData && !this.options.saveRawPage) {
 				const dataAttributeName = docUtil.IMAGE_ATTRIBUTE_NAME;
 				this.doc.querySelectorAll("img").forEach(imgElement => {
 					const imgData = this.options.imageData[Number(imgElement.getAttribute(dataAttributeName))];
@@ -476,7 +476,7 @@ this.SingleFileCore = this.SingleFileCore || (() => {
 						imgElement.setAttribute("src", imgData.currentSrc);
 					}
 				});
-				if (!this.options.saveRawPage && this.options.loadDeferredImages) {
+				if (this.options.loadDeferredImages) {
 					this.doc.querySelectorAll("img[data-src]").forEach(imgElement => {
 						const imgData = this.options.imageData[Number(imgElement.getAttribute(dataAttributeName))];
 						if ((!imgElement.getAttribute("src") || imgElement.getAttribute("src") == EMPTY_IMAGE) && imgElement.getAttribute("data-src")) {