Yuki Takei 7 лет назад
Родитель
Сommit
ae3a8d3af5
1 измененных файлов с 2 добавлено и 7 удалено
  1. 2 7
      src/client/js/components/PageComments.js

+ 2 - 7
src/client/js/components/PageComments.js

@@ -42,18 +42,13 @@ export default class PageComments extends React.Component {
   }
 
   componentWillMount() {
-    const pageId = this.props.pageId;
-
-    if (pageId) {
-      this.init();
-    }
-
+    this.init();
     this.retrieveData = this.retrieveData.bind(this);
   }
 
   init() {
     if (!this.props.pageId) {
-      return ;
+      return;
     }
 
     const layoutType = this.props.crowi.getConfig()['layoutType'];