mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-09 03:04:54 -04: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
@ -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…
x
Reference in New Issue
Block a user