mirror of
https://github.com/zadam/trilium.git
synced 2025-11-10 00:19:04 +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,
|
translatedShortcut,
|
||||||
cls.wrap(() => {
|
cls.wrap(() => {
|
||||||
const targetWindow = getLastFocusedWindow() || mainWindow;
|
const targetWindow = getLastFocusedWindow() || mainWindow;
|
||||||
if (!targetWindow) {
|
if (!targetWindow || targetWindow.isDestroyed()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user