From 69dac75bf891a35728d6cfb16679408785e0a287 Mon Sep 17 00:00:00 2001 From: Kevin Date: Sun, 18 Sep 2022 10:54:20 -0700 Subject: [PATCH] fix engine init logic --- packages/engine-server/src/DendronEngineV3.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/engine-server/src/DendronEngineV3.ts b/packages/engine-server/src/DendronEngineV3.ts index b0bac731ac..6d7fd9824b 100644 --- a/packages/engine-server/src/DendronEngineV3.ts +++ b/packages/engine-server/src/DendronEngineV3.ts @@ -1035,10 +1035,12 @@ export class DendronEngineV3 extends EngineV3Base implements DEngine { numEntries: _.size(notesById), numCacheUpdates: notesCache.numCacheMisses, }); - if (!(await SQLiteMetadataStore.isVaultInitialized(vault))) { - await SQLiteMetadataStore.prisma().dVault.create({ - data: { fsPath: vault.fsPath, wsRoot: this.wsRoot }, - }); + if (enableSQLITE) { + if (!(await SQLiteMetadataStore.isVaultInitialized(vault))) { + await SQLiteMetadataStore.prisma().dVault.create({ + data: { fsPath: vault.fsPath, wsRoot: this.wsRoot }, + }); + } } return notesById; }