mirror of
https://github.com/zadam/trilium.git
synced 2025-11-09 16:08:58 +01:00
add safety check to ensure electron window is not destroyed
This commit is contained in:
parent
44b34d1ea0
commit
a29597a4bf
@ -338,7 +338,7 @@ async function registerGlobalShortcuts() {
|
||||
translatedShortcut,
|
||||
cls.wrap(() => {
|
||||
const targetWindow = getLastFocusedWindow() || mainWindow;
|
||||
if (!targetWindow) {
|
||||
if (!targetWindow || targetWindow.isDestroyed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user