bookmarks use cloning

This commit is contained in:
zadam
2022-12-04 13:16:05 +01:00
parent cd60ad4267
commit 27ce273d29
12 changed files with 832 additions and 200 deletions

View File

@@ -11,7 +11,6 @@ const NoteRevision = require("./note_revision");
const TaskContext = require("../../services/task_context");
const dayjs = require("dayjs");
const utc = require('dayjs/plugin/utc');
const searchService = require("../../services/search/services/search.js");
dayjs.extend(utc)
const LABEL = 'label';
@@ -155,6 +154,15 @@ class Note extends AbstractEntity {
return this.parentBranches;
}
/**
* Returns <i>strong</i> (as opposed to <i>weak</i>) parent branches. See isWeak for details.
*
* @returns {Branch[]}
*/
getStrongParentBranches() {
return this.getParentBranches().filter(branch => !branch.isWeak);
}
/**
* @returns {Branch[]}
* @deprecated use getParentBranches() instead