server-ts: Fix regression

This commit is contained in:
Elian Doran 2024-04-15 21:20:59 +03:00
parent b517b18394
commit 1372cc1cb9
No known key found for this signature in database

View File

@ -128,7 +128,7 @@ function getNotesAndBranchesAndAttributes(_noteIds: string[] | Set<string>) {
} }
function getTree(req: Request) { function getTree(req: Request) {
const subTreeNoteId = req.query.subTreeNoteId === "string" ? req.query.subTreeNoteId : "" || 'root'; const subTreeNoteId = typeof req.query.subTreeNoteId === "string" ? req.query.subTreeNoteId : 'root';
const collectedNoteIds = new Set<string>([subTreeNoteId]); const collectedNoteIds = new Set<string>([subTreeNoteId]);
function collect(parentNote: BNote) { function collect(parentNote: BNote) {