Skip to content

Commit

Permalink
fix engine init logic
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinslin committed Sep 28, 2022
1 parent 3d1bcc3 commit 69dac75
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/engine-server/src/DendronEngineV3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 69dac75

Please sign in to comment.