Skip to content

Commit f10e7ac

Browse files
committed
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 element-hq#9897
1 parent 8458aa7 commit f10e7ac

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎electron_app/src/tray.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ exports.create = function(config) {
6565
global.mainWindow.webContents.on('page-favicon-updated', async function(ev, favicons) {
6666
if (!favicons || favicons.length <= 0 || !favicons[0].startsWith('data:')) {
6767
if (lastFavicon !== null) {
68-
win.setIcon(defaultIcon);
68+
global.mainWindow.setIcon(defaultIcon);
6969
trayIcon.setImage(defaultIcon);
7070
lastFavicon = null;
7171
}

0 commit comments

Comments
 (0)