From 641975ba39b6688966819b715697c6383faec8a3 Mon Sep 17 00:00:00 2001 From: Hunter Miller Date: Mon, 27 Sep 2021 10:35:37 -0500 Subject: [PATCH] vatmeta: fixing potential null ref --- pkg/grid/src/components/VatMeta.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/grid/src/components/VatMeta.tsx b/pkg/grid/src/components/VatMeta.tsx index ad0398a042..16de34dd70 100644 --- a/pkg/grid/src/components/VatMeta.tsx +++ b/pkg/grid/src/components/VatMeta.tsx @@ -8,8 +8,8 @@ export function VatMeta(props: { vat: Vat }) { const { vat } = props; const { desk, arak, cass, hash } = vat; - const { desk: foreignDesk, ship, next } = arak.rail!; - const pluralUpdates = next.length !== 1; + const { desk: foreignDesk, ship, next } = arak.rail || {}; + const pluralUpdates = next?.length !== 1; return (
@@ -24,7 +24,7 @@ export function VatMeta(props: { vat: Vat }) { %{desk} - {next.length > 0 ? ( + {next && next.length > 0 ? ( {next.length} update{pluralUpdates ? 's are' : ' is'} pending a System Update