Skip to content

Build your personal knowledge base with Trilium Notes

fix(client): froca initialization incorrect due to DB init check

Elian Doranb50127b0d3b8
diff --git a/apps/client/src/index.ts b/apps/client/src/index.ts
index 5d750fc865..292138ddc7 100644
--- a/apps/client/src/index.ts
+++ b/apps/client/src/index.ts
@@ -112,7 +112,7 @@ function loadIcons() {
}
function setBodyAttributes() {
- if (!glob.isDbInitialized) return;
+ if (!glob.dbInitialized) return;
const { device, headingStyle, layoutOrientation, platform, isElectron, hasNativeTitleBar, hasBackgroundEffects, currentLocale } = window.glob;
const classesToSet = [
diff --git a/apps/client/src/services/froca.ts b/apps/client/src/services/froca.ts
index 3e71768948..f11ebf9e21 100644
--- a/apps/client/src/services/froca.ts
+++ b/apps/client/src/services/froca.ts
@@ -44,7 +44,7 @@ class FrocaImpl implements Froca {
}
async loadInitialTree() {
- if (!glob.isDbInitialized) return;
+ if (!glob.dbInitialized) return;
const resp = await server.get<SubtreeResponse>("tree");
// clear the cache only directly before adding new content which is important for e.g., switching to protected session
diff --git a/apps/client/src/types.d.ts b/apps/client/src/types.d.ts
index 4a7401ab3a..545ff8e029 100644
--- a/apps/client/src/types.d.ts
+++ b/apps/client/src/types.d.ts
@@ -16,7 +16,6 @@ interface ElectronProcess {
}
interface CustomGlobals extends BootstrapDefinition {
- isDbInitialized: boolean;
isDesktop: typeof utils.isDesktop;
isMobile: typeof utils.isMobile;
getComponentByEl: typeof appContext.getComponentByEl;