recipe editor decimal fixes

This commit is contained in:
vabene1111
2022-01-17 16:27:10 +01:00
parent a19ad706ce
commit 306f90aa98
2 changed files with 7 additions and 0 deletions

View File

@ -586,6 +586,8 @@ export default {
if (this.recipe.working_time === "" || isNaN(this.recipe.working_time)) {
this.recipe.working_time = 0
}
this.recipe.servings = Math.floor(this.recipe.servings) // temporary fix until a proper framework for frontend input validation is established
if (this.recipe.servings === "" || isNaN(this.recipe.servings)) {
this.recipe.servings = 0
}