fixed food editor default properties unit
This commit is contained in:
@ -293,7 +293,9 @@ export default {
|
||||
if (this.item1.id !== undefined) {
|
||||
pf = apiClient.retrieveFood(this.item1.id).then((r) => {
|
||||
this.food = r.data
|
||||
this.food.properties_food_unit = {name: 'g'}
|
||||
if (this.food.properties_food_unit === null) {
|
||||
this.food.properties_food_unit = {name: 'g'}
|
||||
}
|
||||
}).catch(err => {
|
||||
StandardToasts.makeStandardToast(this, StandardToasts.FAIL_FETCH, err)
|
||||
})
|
||||
|
Reference in New Issue
Block a user