Skip to content

Commit

Permalink
Fix: fix unable to save snv translation - EXO-75758 - Meeds-io/meeds#…
Browse files Browse the repository at this point in the history
…2642 (#1238)

prior to this change, when editing an snv with advanced edition option
and adding a translation while automatic translation is disabled, the
save button remains disabled as it checks the validity of the note title
in the snv while it shouldn't in this case which causes the non
validation of the from to enable the save.
This PR ensures to ignore validating the title in an snv case to fix
thus issue.
  • Loading branch information
hakermi authored and exo-swf committed Dec 5, 2024
1 parent f94d7bc commit b6a4627
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,12 @@ export default {
},
computed: {
saveOrUpdateDisabled() {
return (!this.note?.title || this.note?.title?.length < 3
|| this.note?.title?.length > this.titleMaxLength)
|| (this.noteNotModified
return this.notValidTitle || (this.noteNotModified
&& !this.propertiesModified && !this.draftNote && !this.note.draftPage) || this.savingDraft;
},
notValidTitle() {
return !this.webPageNote && (!this.note?.title || this.note?.title?.length < 3 || this.note?.title?.length > this.titleMaxLength);
},
noteNotModified() {
return this.note?.title === this.originalNote?.title && this.$noteUtils.isSameContent(this.note?.content, this.originalNote?.content);
},
Expand Down

0 comments on commit b6a4627

Please sign in to comment.