defensive programming, #3089

This commit is contained in:
zadam 2022-08-26 22:08:05 +02:00
parent 35fab7a23c
commit 5b73fe949e

View File

@ -97,6 +97,11 @@ function getNotesAndBranchesAndAttributes(noteIds) {
for (const attributeId of collectedAttributeIds) {
const attribute = becca.attributes[attributeId];
if (!attribute) {
log.error(`Could not find attribute for attributeId=${attributeId}`);
continue;
}
attributes.push({
attributeId: attribute.attributeId,
noteId: attribute.noteId,