Check for detail before adding to ingredient name

This commit is contained in:
Christopher C. Wells 2021-01-25 20:27:43 -08:00
parent b83366f2d2
commit 746b061a8d
1 changed files with 1 additions and 1 deletions

View File

@ -78,7 +78,7 @@
if (selected.dataset.id) {
this.$refs.ingredients.value = selected.dataset.id;
this.$refs.ingredients_type.value = selected.dataset.type;
this.$refs.ingredients_name.value = `${selected.dataset.name}, ${selected.dataset.detail}`;
this.$refs.ingredients_name.value = selected.dataset.name + (selected.dataset.detail ? `, ${selected.dataset.detail}` : '');
this.searching = false;
}
}