#4261 Fehler bei Artikel aus Liste in Warenkorb

This commit is contained in:
Lorenz Hilpert
2023-08-21 15:12:22 +02:00
parent 6df48eb555
commit a1ad4e4a05

View File

@@ -711,9 +711,12 @@ export class DomainCheckoutService {
for (const item of shoppingCart.items.map((i) => i.data)) {
const latestAvailability = availabilityHistory
.filter((h) => h.shoppingCartItemId === item.id && h.type === item.features.orderType)
.reduce((prev, curr) => {
return prev.timestamp > curr.timestamp ? prev : curr;
});
.reduce(
(prev, curr) => {
return prev.timestamp > curr.timestamp ? prev : curr;
},
{ timestamp: 0 }
);
if (latestAvailability.timestamp + exp < now) {
return of(false);