Ver Fonte

Fix share status display bug

jerryliao há 1 ano atrás
pai
commit
340526dc7c
1 ficheiros alterados com 3 adições e 1 exclusões
  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">