mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	create note from API/import etc. should allow empty title, fixes #2530
This commit is contained in:
		| @@ -102,8 +102,9 @@ function createNewNote(params) { | ||||
|         throw new Error(`Parent note "${params.parentNoteId}" not found.`); | ||||
|     } | ||||
|  | ||||
|     if (!params.title || params.title.trim().length === 0) { | ||||
|         throw new Error(`Note title must not be empty`); | ||||
|     if (params.title === null || params.title === undefined) { | ||||
|         // empty title is allowed since it's possible to create such in the UI | ||||
|         throw new Error(`Note title must be set`); | ||||
|     } | ||||
|  | ||||
|     return sql.transactional(() => { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user