소스 검색

Fix share status display bug

jerryliao 1 년 전
부모
커밋
340526dc7c
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      islands/TopBar.tsx

+ 3 - 1
islands/TopBar.tsx

@@ -30,7 +30,9 @@ export default function TopBar(props: TopBarProps) {
   };
 
   const showShare = () => {
-    shareData["shared"] = shareData["submittedShared"] || props.shared;
+    shareData["shared"] = shareData["submittedShared"] !== undefined
+      ? shareData["submittedShared"]
+      : props.shared;
     window.$modal?.show(
       "Share options",
       <div style="display: flex; align-items: center">