mirror of
https://github.com/zadam/trilium.git
synced 2025-11-17 10:40:41 +01:00
changing title directly from relation map
This commit is contained in:
@@ -222,6 +222,10 @@ async function saveNoteRevision(note) {
|
||||
async function updateNote(noteId, noteUpdates) {
|
||||
const note = await repository.getNote(noteId);
|
||||
|
||||
if (!note.isContentAvailable) {
|
||||
throw new Error(`Note ${noteId} is not available for change!`);
|
||||
}
|
||||
|
||||
if (note.type === 'file') {
|
||||
// for update file, newNote doesn't contain file payloads
|
||||
noteUpdates.content = note.content;
|
||||
|
||||
@@ -78,6 +78,7 @@ async function updateEntity(entity) {
|
||||
delete clone.isOwned;
|
||||
delete clone.isChanged;
|
||||
delete clone.origParentNoteId;
|
||||
delete clone.isContentAvailable;
|
||||
delete clone.__attributeCache;
|
||||
|
||||
for (const key in clone) {
|
||||
|
||||
Reference in New Issue
Block a user