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:
Elian Doran
2024-04-06 22:17:47 +03:00
parent b50ceaf299
commit 4ab6f159e5
2 changed files with 3 additions and 3 deletions

View File

@@ -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.");
}