mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	fix(edit-docs): stop initializing if DB is already so
This commit is contained in:
		| @@ -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(); | ||||||
|  |         } | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user