Jelajahi Sumber

Merge pull request #2169 from visuddhinanda/agile

无译文强制显示原文
visuddhinanda 1 tahun lalu
induk
melakukan
cfd1f2f9b6
1 mengubah file dengan 7 tambahan dan 3 penghapusan
  1. 7 3
      dashboard/src/components/template/SentRead.tsx

+ 7 - 3
dashboard/src/components/template/SentRead.tsx

@@ -96,10 +96,14 @@ const SentReadFrame = ({
     );
     );
     if (typeof displayOriginal === "boolean") {
     if (typeof displayOriginal === "boolean") {
       if (boxOrg.current) {
       if (boxOrg.current) {
-        if (displayOriginal === true) {
-          boxOrg.current.style.display = "block";
-        } else {
+        if (
+          displayOriginal === false &&
+          translation &&
+          translation.length > 0
+        ) {
           boxOrg.current.style.display = "none";
           boxOrg.current.style.display = "none";
+        } else {
+          boxOrg.current.style.display = "block";
         }
         }
       }
       }
     }
     }