Fix reference to main window when setting Electron window icon
This fixes the fallback path which sets the Electron window icon to the default icon in case there's no data URI based icon coming content. This is true immediately after startup, for example. Part of https://github.com/vector-im/riot-web/issues/9897
This commit is contained in:
parent
8458aa7978
commit
f10e7ac224
|
@ -65,7 +65,7 @@ exports.create = function(config) {
|
|||
global.mainWindow.webContents.on('page-favicon-updated', async function(ev, favicons) {
|
||||
if (!favicons || favicons.length <= 0 || !favicons[0].startsWith('data:')) {
|
||||
if (lastFavicon !== null) {
|
||||
win.setIcon(defaultIcon);
|
||||
global.mainWindow.setIcon(defaultIcon);
|
||||
trayIcon.setImage(defaultIcon);
|
||||
lastFavicon = null;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue