Skip to content

Commit

Permalink
Don't warn on format change when campaign content is empty. Closes #634.
Browse files Browse the repository at this point in the history
  • Loading branch information
knadh committed Dec 27, 2021
1 parent c1c2b67 commit e982e6b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions frontend/src/components/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,13 @@ export default {
},
onFormatChange(format) {
if (this.form.body.trim() === '') {
this.form.format = format;
this.onEditorChange();
return;
}
// Content isn't empty. Warn.
this.$utils.confirm(
this.$t('campaigns.confirmSwitchFormat'),
() => {
Expand Down

0 comments on commit e982e6b

Please sign in to comment.