mirror of
https://github.com/TriliumNext/Trilium.git
synced 2025-12-10 03:53:37 -06: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