Explorar el Código

fix comments order

Yuki Takei hace 6 años
padre
commit
01251a070c
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      src/client/js/components/PageComments.jsx

+ 2 - 1
src/client/js/components/PageComments.jsx

@@ -191,7 +191,8 @@ class PageComments extends React.Component {
   render() {
     const topLevelComments = [];
     const allReplies = [];
-    const comments = this.props.commentContainer.state.comments;
+    const comments = this.props.commentContainer.state.comments
+      .slice().reverse(); // create shallow copy and reverse
 
     comments.forEach((comment) => {
       if (comment.replyTo === undefined) {