Skip to content

Build your personal knowledge base with Trilium Notes

fix(electron): allow extra window to reload (#7567)

SngAbc6d4b87888a94
diff --git a/apps/client/src/services/utils.ts b/apps/client/src/services/utils.ts
index 0f17bdc794..f5e037be50 100644
--- a/apps/client/src/services/utils.ts
+++ b/apps/client/src/services/utils.ts
@@ -11,7 +11,11 @@ export function reloadFrontendApp(reason?: string) {
logInfo(`Frontend app reload: ${reason}`);
}
- window.location.reload();
+ if (isElectron()) {
+ dynamicRequire("@electron/remote").BrowserWindow.getFocusedWindow()?.reload();
+ } else {
+ window.location.reload();
+ }
}
export function restartDesktopApp() {