mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-08 23:58:15 -05:00
fixed editor leave warning
This commit is contained in:
@@ -656,8 +656,8 @@ export default {
|
|||||||
},
|
},
|
||||||
warnPageLeave: function (event) {
|
warnPageLeave: function (event) {
|
||||||
if (this.recipe_changed) {
|
if (this.recipe_changed) {
|
||||||
event.returnValue = ""
|
event.returnValue = "this_string_cant_be_empty_because_of_firefox"
|
||||||
return ""
|
return "this_string_cant_be_empty_because_of_firefox"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
loadRecipe: function () {
|
loadRecipe: function () {
|
||||||
@@ -672,8 +672,8 @@ export default {
|
|||||||
// set default visibility style for each component of the step
|
// set default visibility style for each component of the step
|
||||||
this.recipe.steps.forEach((s) => {
|
this.recipe.steps.forEach((s) => {
|
||||||
this.$set(s, "time_visible", s.time !== 0)
|
this.$set(s, "time_visible", s.time !== 0)
|
||||||
this.$set(s, "ingredients_visible", s.ingredients.length > 0)
|
this.$set(s, "ingredients_visible", s.ingredients.length > 0 || this.recipe.steps.length === 1)
|
||||||
this.$set(s, "instruction_visible", s.instruction !== "")
|
this.$set(s, "instruction_visible", s.instruction !== "" || this.recipe.steps.length === 1)
|
||||||
this.$set(s, "step_recipe_visible", s.step_recipe !== null)
|
this.$set(s, "step_recipe_visible", s.step_recipe !== null)
|
||||||
this.$set(s, "file_visible", s.file !== null)
|
this.$set(s, "file_visible", s.file !== null)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user