Skip to content

Commit fc88a2d

Browse files
committed
Use png_data for favicon of bookmarks imported from HTML
fix brave#4339 requires brave/muon#64 Auditors: @bridiver, @bbondy Test Plan: 1. Import bookmarks from HTML file 2. There should be favicon shows when show favicon option is on
1 parent bebb4d6 commit fc88a2d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/importer.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,11 @@ importer.on('add-bookmarks', (e, bookmarks, topLevelFolder) => {
154154
importer.on('add-favicons', (e, detail) => {
155155
let faviconMap = {}
156156
detail.forEach((entry) => {
157-
faviconMap[entry.urls[0]] = entry.favicon_url
157+
if (entry.favicon_url.startsWith('made-up-favicon:')) {
158+
faviconMap[entry.urls[0]] = entry.png_data
159+
} else {
160+
faviconMap[entry.urls[0]] = entry.favicon_url
161+
}
158162
})
159163
let sites = AppStore.getState().get('sites')
160164
sites = sites.map((site) => {

0 commit comments

Comments
 (0)