always preserve old text when editing a note
before this change: * create a note, with text * `note` has a row with the text * `note_edit` doesn't have any matching row * edit the note, removing all the text * the row in `note` has the new, empty, text * `note_edit` has a matching row, but its `oldText` is NULL so the original text is lost after this change, the row in `note_edit` always keeps the previous text
This commit is contained in:
parent
9a73e98551
commit
219c7fa6ec
1 changed files with 1 additions and 1 deletions
|
@ -393,7 +393,7 @@ export class NoteEditService implements OnApplicationShutdown {
|
||||||
await this.noteEditRepository.insert({
|
await this.noteEditRepository.insert({
|
||||||
id: this.idService.gen(),
|
id: this.idService.gen(),
|
||||||
noteId: oldnote.id,
|
noteId: oldnote.id,
|
||||||
oldText: update.text ? oldnote.text : undefined,
|
oldText: oldnote.text || undefined,
|
||||||
newText: update.text || undefined,
|
newText: update.text || undefined,
|
||||||
cw: update.cw || undefined,
|
cw: update.cw || undefined,
|
||||||
fileIds: undefined,
|
fileIds: undefined,
|
||||||
|
|
Loading…
Reference in a new issue