Parcourir la source

enableUnsavedWarningenableUnsavedWarning

yuto-oweseek il y a 4 ans
Parent
commit
808f4f1515
1 fichiers modifiés avec 5 ajouts et 5 suppressions
  1. 5 5
      packages/app/src/components/PageStatusAlert.jsx

+ 5 - 5
packages/app/src/components/PageStatusAlert.jsx

@@ -170,14 +170,14 @@ class PageStatusAlert extends React.Component {
 
 
     let getContentsFunc = null;
     let getContentsFunc = null;
 
 
-    // when remote revision is newer than both
-    if (isHackmdDocumentOutdated && isRevisionOutdated) {
-      getContentsFunc = this.getContentsForUpdatedAlert;
-    }
     // when conflicting on save
     // when conflicting on save
-    else if (isRevisionOutdated) {
+    if (isRevisionOutdated) {
       getContentsFunc = this.getContentsForRevisionOutdated;
       getContentsFunc = this.getContentsForRevisionOutdated;
     }
     }
+    // when remote revision is newer than both
+    else if (isHackmdDocumentOutdated && isRevisionOutdated) {
+      getContentsFunc = this.getContentsForUpdatedAlert;
+    }
     // when someone editing with HackMD
     // when someone editing with HackMD
     else if (isHackmdDraftUpdatingInRealtime) {
     else if (isHackmdDraftUpdatingInRealtime) {
       getContentsFunc = this.getContentsForSomeoneEditingAlert;
       getContentsFunc = this.getContentsForSomeoneEditingAlert;