Explorar el Código

enableUnsavedWarningenableUnsavedWarning

yuto-oweseek hace 4 años
padre
commit
808f4f1515
Se han modificado 1 ficheros con 5 adiciones y 5 borrados
  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;
 
-    // when remote revision is newer than both
-    if (isHackmdDocumentOutdated && isRevisionOutdated) {
-      getContentsFunc = this.getContentsForUpdatedAlert;
-    }
     // when conflicting on save
-    else if (isRevisionOutdated) {
+    if (isRevisionOutdated) {
       getContentsFunc = this.getContentsForRevisionOutdated;
     }
+    // when remote revision is newer than both
+    else if (isHackmdDocumentOutdated && isRevisionOutdated) {
+      getContentsFunc = this.getContentsForUpdatedAlert;
+    }
     // when someone editing with HackMD
     else if (isHackmdDraftUpdatingInRealtime) {
       getContentsFunc = this.getContentsForSomeoneEditingAlert;