mirror of
https://github.com/zadam/trilium.git
synced 2025-06-05 01:18:44 +02:00
create note from API/import etc. should allow empty title, fixes #2530
This commit is contained in:
parent
82ba0d5b1d
commit
b90ba3d1a9
@ -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(() => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user