mirror of
https://github.com/urbit/shrub.git
synced 2024-12-19 16:51:42 +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 { vat } = props;
|
||||||
const { desk, arak, cass, hash } = vat;
|
const { desk, arak, cass, hash } = vat;
|
||||||
|
|
||||||
const { desk: foreignDesk, ship, next } = arak.rail!;
|
const { desk: foreignDesk, ship, next } = arak.rail || {};
|
||||||
const pluralUpdates = next.length !== 1;
|
const pluralUpdates = next?.length !== 1;
|
||||||
return (
|
return (
|
||||||
<div className="mt-5 sm:mt-8 space-y-5 sm:space-y-8">
|
<div className="mt-5 sm:mt-8 space-y-5 sm:space-y-8">
|
||||||
<Attribute title="Developer Desk" attr="desk">
|
<Attribute title="Developer Desk" attr="desk">
|
||||||
@ -24,7 +24,7 @@ export function VatMeta(props: { vat: Vat }) {
|
|||||||
<Attribute title="Installed into" attr="local-desk">
|
<Attribute title="Installed into" attr="local-desk">
|
||||||
%{desk}
|
%{desk}
|
||||||
</Attribute>
|
</Attribute>
|
||||||
{next.length > 0 ? (
|
{next && next.length > 0 ? (
|
||||||
<Attribute attr="next" title="Pending Updates">
|
<Attribute attr="next" title="Pending Updates">
|
||||||
{next.length} update{pluralUpdates ? 's are' : ' is'} pending a System Update
|
{next.length} update{pluralUpdates ? 's are' : ' is'} pending a System Update
|
||||||
</Attribute>
|
</Attribute>
|
||||||
|
Loading…
Reference in New Issue
Block a user