mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-16 19:57:52 +01:00
web: call database.setup() before db init
This commit is contained in:
committed by
Abdullah Atta
parent
0f2acb2801
commit
c881e74aae
@@ -28,10 +28,12 @@ let db: Database = {};
|
||||
async function initializeDatabase(persistence: DatabasePersistence) {
|
||||
logger.measure("Database initialization");
|
||||
|
||||
const { default: Database } = await import("@notesnook/core/api");
|
||||
const { database } = await import("@notesnook/common");
|
||||
const { default: FS } = await import("../interfaces/fs");
|
||||
const { Compressor } = await import("../utils/compressor");
|
||||
db = new Database(
|
||||
db = database;
|
||||
|
||||
database.setup(
|
||||
new NNStorage("Notesnook", persistence),
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
|
||||
Reference in New Issue
Block a user