mirror of
https://github.com/zadam/trilium.git
synced 2025-11-06 05:15:59 +01:00
server-ts: Fix "Missing or incorrect type for target branch ID"
When attempting to add a new note from the relation map
This commit is contained in:
@@ -43,7 +43,7 @@ function createNote(req: Request) {
|
||||
throw new ValidationError("Invalid target type.");
|
||||
}
|
||||
|
||||
if (typeof targetBranchId !== "string") {
|
||||
if (targetBranchId && typeof targetBranchId !== "string") {
|
||||
throw new ValidationError("Missing or incorrect type for target branch ID.");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user