diff --git a/src/routes/kultCash.ts b/src/routes/kultCash.ts index 05ad74c..f95a133 100644 --- a/src/routes/kultCash.ts +++ b/src/routes/kultCash.ts @@ -227,14 +227,13 @@ app.post('/log', async (c) => { payment: mapPayment(order.paymentMethod), items: { createMany: { - data: - order!.cartItems - .filter(({product}) => product != undefined) - .map(({amount, product}) => ({ - amount, - name: product!.name, // not sure why product is nullable - perUnitPrice: product!.price, - })) ?? [], + data: order.cartItems + .filter(({product}) => product != undefined) + .map(({amount, product}) => ({ + amount, + name: product!.name, // not sure why product is nullable + perUnitPrice: product!.price, + })), }, }, },