mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-10 02:08:38 +09:00
[Basilisk] Don't try to force x-icon image type for search engine icon.
If it's not actually an image, then throw a warning in the console and bail.
This commit is contained in:
parent
cfadb0bc6f
commit
d88f98c226
1 changed files with 6 additions and 2 deletions
|
|
@ -1371,8 +1371,12 @@ Engine.prototype = {
|
|||
}
|
||||
|
||||
let type = chan.contentType;
|
||||
if (!type.startsWith("image/"))
|
||||
type = "image/x-icon";
|
||||
if (!type.startsWith("image/")) {
|
||||
console.warn(
|
||||
"Search service: Unable to set icon, content type is not an image",
|
||||
contentType);
|
||||
return;
|
||||
}
|
||||
let dataURL = "data:" + type + ";base64," +
|
||||
btoa(String.fromCharCode.apply(null, aByteArray));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue