null check

This commit is contained in:
zadam 2022-04-16 15:10:16 +02:00
parent 75c8e700d4
commit 51e5f591b2

View file

@ -6,6 +6,10 @@ const becca = require('../becca/becca');
const Attribute = require('../becca/entities/attribute');
function runAttachedRelations(note, relationName, originEntity) {
if (!note) {
return;
}
// same script note can get here with multiple ways, but execute only once
const notesToRun = new Set(
note.getRelations(relationName)