yuto-oweseek 4 лет назад
Родитель
Сommit
08d3085543

+ 5 - 1
packages/app/src/client/services/PageContainer.js

@@ -679,9 +679,13 @@ export default class PageContainer extends Container {
 
     const editorContainer = this.appContainer.getContainer('EditorContainer');
     editorContainer.clearDraft(path);
-    window.location.href = path;
 
     return res;
   }
 
+  async resolveConflictAndReload(pageId, revisionId, markdown, optionsToSave) {
+    await this.resolveConflict(pageId, revisionId, markdown, optionsToSave);
+    window.location.href = this.state.path;
+  }
+
 }

+ 1 - 0
packages/app/src/components/PageEditor/ConflictDiffModal.tsx

@@ -54,6 +54,7 @@ export const ConflictDiffModal: FC<ConflictDiffModalProps> = (props) => {
         latest.revisionId,
         resolvedRevision.current, editorContainer.getCurrentOptionsToSave(),
       );
+      window.location.href = pageContainer.state.path || '/';
     }
     catch (error) {
       pageContainer.showErrorToastr(error);