Skip to content

Commit

Permalink
fix: Featured image not saved at the note creation - EXO-74744 - Meed…
Browse files Browse the repository at this point in the history
  • Loading branch information
sofyenne committed Oct 15, 2024
1 parent f454009 commit a7833aa
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ export default {
if (draftNote.properties) {
draftNote.properties.draft = true;
if (this.newTranslation && !this.featuredImageUpdated) {
draftNote.properties.featuredImage = null;
draftNote.properties.featuredImage = {};
}
}
this.$notesService.saveDraftNote(draftNote, this.parentPageId).then(savedDraftNote => {
Expand Down Expand Up @@ -399,10 +399,11 @@ export default {
});
},
createNote(note) {
note.properties = {
draft: this.note?.draftPage,
noteId: this.note?.id
};
note.properties = note.properties || {};
if (!note.properties.noteId) {
note.properties.noteId = this.note?.id;
note.properties.draftPage = this.note?.draftPage;
}
return this.$notesService.createNote(note).then(data => {
const draftNote = JSON.parse(localStorage.getItem(`draftNoteId-${this.note.id}-${this.selectedLanguage}`));
this.note = data;
Expand Down

0 comments on commit a7833aa

Please sign in to comment.