mirror of
https://github.com/zadam/trilium.git
synced 2026-03-23 20:30:12 +01:00
add safety check to ensure electron window is not destroyed
This commit is contained in:
@@ -338,7 +338,7 @@ async function registerGlobalShortcuts() {
|
||||
translatedShortcut,
|
||||
cls.wrap(() => {
|
||||
const targetWindow = getLastFocusedWindow() || mainWindow;
|
||||
if (!targetWindow) {
|
||||
if (!targetWindow || targetWindow.isDestroyed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user