itizawa 5 سال پیش
والد
کامیت
736bd38334
1فایلهای تغییر یافته به همراه1 افزوده شده و 3 حذف شده
  1. 1 3
      src/client/js/components/PageEditor.jsx

+ 1 - 3
src/client/js/components/PageEditor.jsx

@@ -103,11 +103,9 @@ class PageEditor extends React.Component {
    */
    */
   onMarkdownChanged(value) {
   onMarkdownChanged(value) {
     const { pageContainer } = this.props;
     const { pageContainer } = this.props;
-    const { revisionId } = pageContainer.state;
     this.setMarkdownStateWithDebounce(value);
     this.setMarkdownStateWithDebounce(value);
-
     // only when the first time to edit
     // only when the first time to edit
-    if (!revisionId) {
+    if (!pageContainer.state.revisionId) {
       this.saveDraftWithDebounce();
       this.saveDraftWithDebounce();
     }
     }
   }
   }