mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-30 18:05:55 +01:00 
			
		
		
		
	fix(edit-docs): attachments duplication
This commit is contained in:
		| @@ -52,6 +52,16 @@ async function importData(input: Buffer) { | |||||||
|     const beccaLoader = ((await import("./src/becca/becca_loader.js")).default); |     const beccaLoader = ((await import("./src/becca/becca_loader.js")).default); | ||||||
|     const notes = ((await import("./src/services/notes.js")).default); |     const notes = ((await import("./src/services/notes.js")).default); | ||||||
|     beccaLoader.load(); |     beccaLoader.load(); | ||||||
|  |     const becca = ((await import("./src/becca/becca.js")).default); | ||||||
|  |     const utils = ((await import("./src/services/utils.js")).default); | ||||||
|  |     const eraseService = ((await import("./src/services/erase.js")).default); | ||||||
|  |     const deleteId = utils.randomString(10); | ||||||
|  |  | ||||||
|  |     const existingNote = becca.getNote(NOTE_ID_USER_GUIDE); | ||||||
|  |     if (existingNote) { | ||||||
|  |         existingNote.deleteNote(deleteId); | ||||||
|  |     } | ||||||
|  |     eraseService.eraseNotesWithDeleteId(deleteId); | ||||||
|  |  | ||||||
|     const { note } = notes.createNewNoteWithTarget("into", "none_root", { |     const { note } = notes.createNewNoteWithTarget("into", "none_root", { | ||||||
|         parentNoteId: "root", |         parentNoteId: "root", | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user