Jelajahi Sumber

fix support of favicon

Gildas 2 tahun lalu
induk
melakukan
a800ae6601
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      src/ui/content/content-ui-editor-web.js

+ 2 - 2
src/ui/content/content-ui-editor-web.js

@@ -1190,9 +1190,9 @@ pre code {
 				const iconElement = origContentDocument.querySelector("link[rel*=icon]");
 				if (iconElement) {
 					const iconResource = resources.find(resource => resource.filename == iconElement.getAttribute("href"));
-					if (iconResource && iconResource.blob) {
+					if (iconResource && iconResource.content) {
 						const reader = new FileReader();
-						reader.readAsDataURL(iconResource.blob);
+						reader.readAsDataURL(await (await fetch(iconResource.content)).blob());
 						icon = await new Promise((resolve, reject) => {
 							reader.addEventListener("load", () => resolve(reader.result), false);
 							reader.addEventListener("error", reject, false);