mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-25 07:52:59 +03:00
vatmeta: fixing potential null ref
This commit is contained in:
parent
934c32d401
commit
641975ba39
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user