extra null relation checks in notemap

This commit is contained in:
zadam 2022-10-08 22:24:58 +02:00
parent 3e4a9f63fa
commit 5a3c50d9fb

View file

@ -48,7 +48,7 @@ function getNeighbors(note, depth) {
const targetNote = relation.getTargetNote();
if (targetNote.hasLabel('excludeFromNoteMap')) {
if (!targetNote || targetNote.hasLabel('excludeFromNoteMap')) {
continue;
}
@ -67,7 +67,7 @@ function getNeighbors(note, depth) {
const sourceNote = relation.getNote();
if (sourceNote.hasLabel('excludeFromNoteMap')) {
if (!sourceNote || sourceNote.hasLabel('excludeFromNoteMap')) {
continue;
}