소스 검색

add copy operation to resolve conflict method

yuto-oweseek 4 년 전
부모
커밋
d53e2318c7
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      packages/app/src/client/services/PageContainer.js

+ 3 - 2
packages/app/src/client/services/PageContainer.js

@@ -651,11 +651,12 @@ export default class PageContainer extends Container {
 
     const { pageId, remoteRevisionId, path } = this.state;
     const editorContainer = this.appContainer.getContainer('EditorContainer');
-    const optionsToSave = editorContainer.getCurrentOptionsToSave();
+    const options = editorContainer.getCurrentOptionsToSave();
+    const optionsToSave = Object.assign({}, options);
 
-    editorContainer.clearDraft(path);
     const res = await this.updatePage(pageId, remoteRevisionId, markdown, optionsToSave);
 
+    editorContainer.clearDraft(path);
     this.updateStateAfterSave(res.page, res.tags, res.revision, editrMode);
 
     editorContainer.setState({ tags: res.tags });