Joystream Stats 1 anno fa
parent
commit
fe80a91390
2 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 1 1
      src/components/Media/Videos.tsx
  2. 1 1
      src/components/Modals/Status.tsx

+ 1 - 1
src/components/Media/Videos.tsx

@@ -24,7 +24,7 @@ const Video = (props: {}) => {
   if (!providers?.length) return "";
   
   const alt = `${id} ${videoMedia.title}`;  
-  const url = providers[0].operators[0].metadata.nodeEndpoint;
+  const url = providers[0].operators[0]?.metadata.nodeEndpoint ?? null;
   
   return (
     <div

+ 1 - 1
src/components/Modals/Status.tsx

@@ -45,7 +45,7 @@ const Status = (props) => {
             <div className="col-2 text-right">{missing}</div>
           </div>
           <Row
-            min={proposals.filter((p) => p && p.votesByAccount).length}
+            min={proposals?.filter((p) => p && p.votesByAccount).length ?? 0}
             max={status.proposals}
             label="Proposals"
           />