Procházet zdrojové kódy

没有oldSent的用第一个句子的内容

visuddhinanda před 2 roky
rodič
revize
4c7181cccd

+ 2 - 2
dashboard/src/components/discussion/DiscussionTopicChildren.tsx

@@ -95,7 +95,7 @@ const DiscussionTopicChildrenWidget = ({
             type: "sent",
             type: "sent",
             sent: currSent,
             sent: currSent,
             date: 0,
             date: 0,
-            oldSent: currOldSent,
+            oldSent: currOldSent ? currOldSent : currSent[0].content,
           });
           });
         }
         }
         newMixItems.push(value);
         newMixItems.push(value);
@@ -117,7 +117,7 @@ const DiscussionTopicChildrenWidget = ({
         type: "sent",
         type: "sent",
         sent: currSent,
         sent: currSent,
         date: 0,
         date: 0,
-        oldSent: currOldSent,
+        oldSent: currOldSent ? currOldSent : currSent[0].content,
       });
       });
     }
     }
     setItems(newMixItems);
     setItems(newMixItems);