From f77012928677f865ebb91d26c86d196e50c8d855 Mon Sep 17 00:00:00 2001 From: meskio <meskio@sindominio.net> Date: Wed, 8 Sep 2021 19:10:25 +0200 Subject: [PATCH] Accept null product orders --- src/order/ShowOrder.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/order/ShowOrder.js b/src/order/ShowOrder.js index 34b4ec8..5d26ecd 100644 --- a/src/order/ShowOrder.js +++ b/src/order/ShowOrder.js @@ -45,6 +45,9 @@ function ShowOrderResults(props) { return p; }); const transactions = props.order.transactions.map((t) => { + if (t.order_purchase === null) { + return null; + } const list = t.order_purchase.map((purchase) => { const i = products.findIndex((p) => p.ID === purchase.order_product_id); if (i === -1) { -- GitLab