mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-29 18:19:41 +02:00
Handle untitled note (#592)
* Leave recipe in edit mode in case of an API error * Initialize recipe note with empty title Fixes #586
This commit is contained in:
parent
1356043257
commit
3b99a147fb
3 changed files with 2 additions and 2 deletions
|
@ -55,7 +55,7 @@ export default {
|
|||
return utils.generateUniqueKey(item, index);
|
||||
},
|
||||
addNote() {
|
||||
this.value.push({ text: "" });
|
||||
this.value.push({ title: "", text: "" });
|
||||
},
|
||||
removeByIndex(list, index) {
|
||||
list.splice(index, 1);
|
||||
|
|
|
@ -134,7 +134,6 @@ export default {
|
|||
break;
|
||||
case SAVE_EVENT:
|
||||
this.$emit(SAVE_EVENT);
|
||||
this.$emit("input", false);
|
||||
break;
|
||||
case JSON_EVENT:
|
||||
this.$emit(JSON_EVENT);
|
||||
|
|
|
@ -233,6 +233,7 @@ export default {
|
|||
async saveRecipe() {
|
||||
if (this.validateRecipe()) {
|
||||
let slug = await api.recipes.update(this.recipeDetails);
|
||||
if(!slug) return;
|
||||
|
||||
if (this.fileObject) {
|
||||
this.saveImage(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue