mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 03:46:37 +01:00
added isBeingDeleted to be able to recognize that note is being deleted while still leaving it accessible
This commit is contained in:
@@ -113,7 +113,13 @@ class Attribute extends AbstractEntity {
|
||||
* @returns {Note|null}
|
||||
*/
|
||||
getNote() {
|
||||
return this.becca.getNote(this.noteId);
|
||||
const note = this.becca.getNote(this.noteId);
|
||||
|
||||
if (!note) {
|
||||
throw new Error(`Note '${this.noteId}' of attribute '${this.attributeId}', type '${this.type}', name '${this.name}' does not exist.`);
|
||||
}
|
||||
|
||||
return note;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user