yusuketk 5 лет назад
Родитель
Сommit
3052bb3b1b

+ 0 - 2
src/client/js/components/MyDraftList/MyDraftList.jsx

@@ -17,8 +17,6 @@ class MyDraftList extends React.Component {
   constructor(props) {
     super(props);
 
-    this.props.editorContainer.initDrafts();
-
     this.state = {
       drafts: [],
       currentDrafts: [],

+ 4 - 6
src/client/js/services/EditorContainer.js

@@ -90,12 +90,10 @@ export default class EditorContainer extends Container {
       }
     }
 
-    if (this.state !== undefined) {
-      if (this.state.pageId == null) {
-        const draft = this.findDraft(this.state.path);
-        if (draft != null) {
-          this.state.markdown = draft;
-        }
+    if (this.state.pageId == null) {
+      const draft = this.findDraft(this.state.path);
+      if (draft != null) {
+        this.state.markdown = draft;
       }
     }
   }