mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-19 00:42: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() {
|
async function main() {
|
||||||
await initializeTranslations();
|
await initializeTranslations();
|
||||||
await importData();
|
await initializeDatabase();
|
||||||
|
|
||||||
await startElectron();
|
await startElectron();
|
||||||
// await exportData();
|
// await exportData();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function importData() {
|
async function initializeDatabase() {
|
||||||
const sql = (await import("./src/services/sql.js")).default;
|
|
||||||
const sqlInit = (await import("./src/services/sql_init.js")).default;
|
const sqlInit = (await import("./src/services/sql_init.js")).default;
|
||||||
|
|
||||||
cls.init(() => {
|
cls.init(() => {
|
||||||
|
if (!sqlInit.isDbInitialized()) {
|
||||||
sqlInit.createInitialDatabase();
|
sqlInit.createInitialDatabase();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user