Joystream Stats 1 年之前
父節點
當前提交
fe80a91390
共有 2 個文件被更改,包括 2 次插入2 次删除
  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"
           />