diff --git a/frontend/src/components/Charts/DepthChart/index.tsx b/frontend/src/components/Charts/DepthChart/index.tsx index d67071f2..7c9b3bd6 100644 --- a/frontend/src/components/Charts/DepthChart/index.tsx +++ b/frontend/src/components/Charts/DepthChart/index.tsx @@ -68,8 +68,8 @@ const DepthChart: React.FC = ({ useEffect(() => { if (Object.values(federation.book).length > 0) { const enriched = Object.values(federation.book).map((order) => { - if (order && order.coordinatorShortAlias != null && order.currency) { - const limits = federation.getCoordinator(order.coordinatorShortAlias).limits; + if (order?.coordinatorShortAlias && order?.currency) { + const limits = federation.getCoordinator(order.coordinatorShortAlias)?.limits; const originalPrice = (limits[order.currency]?.price ?? 0) * (1 + parseFloat(order.premium) / 100);