Fix property assignment

This commit is contained in:
rafael-aero
2021-09-01 14:08:30 +02:00
parent 5ba10136e2
commit 7b5bac2083
2 changed files with 4 additions and 2 deletions

View File

@@ -602,7 +602,8 @@ module.exports = (socket, app) => {
getWindowById(id)?.setVibrancy(type);
});
socket.on('browserWindowSetExcludedFromShownWindowsMenu', (id) => {
getWindowById(id)?.excludedFromShownWindowsMenu = true;
const w = getWindowById(id);
if (w) w.excludedFromShownWindowsMenu = true;
});
socket.on('browserWindow-setBrowserView', (id, browserViewId) => {

View File

@@ -765,7 +765,8 @@ export = (socket: Socket, app: Electron.App) => {
});
socket.on('browserWindowSetExcludedFromShownWindowsMenu', (id) => {
getWindowById(id)?.excludedFromShownWindowsMenu = true;
const w = getWindowById(id);
if(w) w.excludedFromShownWindowsMenu = true;
});
socket.on('browserWindow-setBrowserView', (id, browserViewId) => {