Fixed dupe meal bug
This commit is contained in:
parent
e251cbde5c
commit
a18db72692
1 changed files with 2 additions and 0 deletions
|
|
@ -148,6 +148,8 @@ export default {
|
||||||
async saveMeal() {
|
async saveMeal() {
|
||||||
const meal = await data.saveMeal(this.meal);
|
const meal = await data.saveMeal(this.meal);
|
||||||
if (meal?.id >= 0) {
|
if (meal?.id >= 0) {
|
||||||
|
this.meal = meal;
|
||||||
|
|
||||||
this.$router.push(`/meals/${meal.id}`);
|
this.$router.push(`/meals/${meal.id}`);
|
||||||
alert.show({ heading: 'Meal saved', message: 'Meal saved successfully', type: 'success' });
|
alert.show({ heading: 'Meal saved', message: 'Meal saved successfully', type: 'success' });
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue