mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-11-03 02:33:31 -05: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:
		@@ -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);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user