small fixes

This commit is contained in:
zadam
2021-02-19 22:58:53 +01:00
parent c94fb7a62d
commit 56506d33a7
3 changed files with 8 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
"use strict";
const noteCache = require('../../services/note_cache/note_cache');
const log = require('../../services/log');
function getNotesAndBranchesAndAttributes(noteIds) {
noteIds = new Set(noteIds);
@@ -76,6 +77,11 @@ function getNotesAndBranchesAndAttributes(noteIds) {
for (const branchId of collectedBranchIds) {
const branch = noteCache.branches[branchId];
if (!branch) {
log.error(`Could not find branch for branchId=${branchId}`);
continue;
}
branches.push({
branchId: branch.branchId,
noteId: branch.noteId,