Improved group matching
This commit is contained in:
parent
6cc9f8fef7
commit
7705c3113c
2 changed files with 3 additions and 3 deletions
|
|
@ -154,8 +154,8 @@ async function saveShoppingList(outstandingItemGroups) {
|
|||
}
|
||||
|
||||
const groupsMatch = (a, b) => {
|
||||
if (a.product != b.product) return false;
|
||||
if (a.name && a.name === b.name) return true;
|
||||
if (!!a.product != !!b.product) return false;
|
||||
if (a.name) return a.name === b.name;
|
||||
return a.product.id === b.product.id;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<div class="product-details">
|
||||
<h3 class="header">
|
||||
<strong>
|
||||
<a v-if="shoppingListItemGroup.product?.link" :href="shoppingListItemGroup.product?.link">{{ shoppingListItemGroup.product.name }}</a>
|
||||
<a v-if="shoppingListItemGroup.product?.link" :href="shoppingListItemGroup.product?.link">{{ shoppingListItemGroup.product?.name }}</a>
|
||||
<span v-else>{{ shoppingListItemGroup.name }}</span>
|
||||
</strong>,
|
||||
<small>
|
||||
|
|
|
|||
Loading…
Reference in a new issue