This commit is contained in:
Chiro 2021-12-20 19:00:33 +08:00 committed by qier222
parent 773f7bee9e
commit 8151343787
No known key found for this signature in database
GPG key ID: 9C85007ED905F14D

View file

@ -347,10 +347,12 @@ class Background {
}
// create dock menu for macOS
app.dock.setMenu(createDockMenu(this.window));
const createdDockMenu = createDockMenu(this.window);
if (createDockMenu && app.dock) app.dock.setMenu(createdDockMenu);
// create touch bar
this.window.setTouchBar(createTouchBar(this.window));
const createdTouchBar = createTouchBar(this.window);
if (createdTouchBar) this.window.setTouchBar(createdTouchBar);
// register global shortcuts
if (this.store.get('settings.enableGlobalShortcut') !== false) {