mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-10 10:22:29 +08:00
fix(edit-docs): stop initializing if DB is already so
This commit is contained in:
parent
f3d753cc46
commit
42d3236fe7
@ -15,18 +15,19 @@ async function startElectron() {
|
||||
|
||||
async function main() {
|
||||
await initializeTranslations();
|
||||
await importData();
|
||||
await initializeDatabase();
|
||||
|
||||
await startElectron();
|
||||
// await exportData();
|
||||
}
|
||||
|
||||
async function importData() {
|
||||
const sql = (await import("./src/services/sql.js")).default;
|
||||
async function initializeDatabase() {
|
||||
const sqlInit = (await import("./src/services/sql_init.js")).default;
|
||||
|
||||
cls.init(() => {
|
||||
sqlInit.createInitialDatabase();
|
||||
if (!sqlInit.isDbInitialized()) {
|
||||
sqlInit.createInitialDatabase();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user