converting note properties to methods

This commit is contained in:
zadam
2021-05-17 22:35:36 +02:00
parent a5d702b143
commit 2451596e8c
19 changed files with 48 additions and 48 deletions

View File

@@ -64,7 +64,7 @@ function buildRewardMap(note) {
}
}
for (const ancestorNote of note.ancestors) {
for (const ancestorNote of note.getAncestors()) {
if (ancestorNote.noteId === 'root') {
continue;
}
@@ -249,7 +249,7 @@ async function findSimilarNotes(noteId) {
const rewardMap = buildRewardMap(baseNote);
let ancestorRewardCache = {};
const ancestorNoteIds = new Set(baseNote.ancestors.map(note => note.noteId));
const ancestorNoteIds = new Set(baseNote.getAncestors().map(note => note.noteId));
ancestorNoteIds.add(baseNote.noteId);
let displayRewards = false;