Skip to content

Commit 0a6d68d

Browse files
author
Daisuke Akatsuka
committed
Bug 1882967: Create icon image by its blob and mimetype r=adw
Differential Revision: https://phabricator.services.mozilla.com/D203237
1 parent 1b9ff1e commit 0a6d68d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

browser/components/urlbar/private/SuggestBackendRust.sys.mjs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,12 @@ export class SuggestBackendRust extends BaseFeature {
136136
suggestion.provider = type;
137137
suggestion.is_sponsored = type == "Amp" || type == "Yelp";
138138
if (Array.isArray(suggestion.icon)) {
139-
suggestion.icon_blob = new Blob(
140-
[new Uint8Array(suggestion.icon)],
141-
type == "Yelp" ? { type: "image/svg+xml" } : null
142-
);
139+
suggestion.icon_blob = new Blob([new Uint8Array(suggestion.icon)], {
140+
type: suggestion.iconMimetype ?? "",
141+
});
142+
143143
delete suggestion.icon;
144+
delete suggestion.iconMimetype;
144145
}
145146
}
146147

0 commit comments

Comments
 (0)