diff --git a/apps/client/src/components/root_command_executor.ts b/apps/client/src/components/root_command_executor.ts index 632eb0a88..3ad05b7a2 100644 --- a/apps/client/src/components/root_command_executor.ts +++ b/apps/client/src/components/root_command_executor.ts @@ -171,7 +171,8 @@ export default class RootCommandExecutor extends Component { } toggleTrayCommand() { - if (!utils.isElectron()) return; + if (!utils.isElectron() || options.is("disableTray")) return; + const { BrowserWindow } = utils.dynamicRequire("@electron/remote"); const windows = BrowserWindow.getAllWindows() as Electron.BaseWindow[]; const isVisible = windows.every((w) => w.isVisible());