vatmeta: fixing potential null ref
@@ -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 (
<div className="mt-5 sm:mt-8 space-y-5 sm:space-y-8">
<Attribute title="Developer Desk" attr="desk">
@@ -24,7 +24,7 @@ export function VatMeta(props: { vat: Vat }) {
<Attribute title="Installed into" attr="local-desk">
%{desk}
</Attribute>
- {next.length > 0 ? (
+ {next && next.length > 0 ? (
<Attribute attr="next" title="Pending Updates">
{next.length} update{pluralUpdates ? 's are' : ' is'} pending a System Update
</Attribute>
