人生啊人生 3 semanas atrás
pai
commit
35a2b4b1f5
1 arquivos alterados com 22 adições e 12 exclusões
  1. 22 12
      exe/src/main/index.js

+ 22 - 12
exe/src/main/index.js

@@ -307,19 +307,29 @@ function mainToMaxEvent() {
   
     setInterval(function() {
 
-        if (mainWindow == null || mainWindow == undefined) {
-            return;
-        }
-      
-        let mainToMax = CommonVar.find().cacheGetOrUpdate('get', 'mainToMax');
-    
-        if (mainToMax === null) {
-            return;
+        // console.log("mainWindow --------- start");
+        // console.log(mainWindow);
+        // console.log("mainWindow --------- end");
+
+        try {
+
+            if (mainWindow == null || mainWindow == undefined) {
+                return;
+            }
+        
+            let mainToMax = CommonVar.find().cacheGetOrUpdate('get', 'mainToMax');
+        
+            if (mainToMax === null) {
+                return;
+            }
+        
+            mainWindow.maximize();
+            CommonVar.find().cacheGetOrUpdate('set', 'mainToMax', null);
+
+        } catch (e) {
+
         }
-    
-        CommonVar.find().cacheGetOrUpdate('set', 'mainToMax', null);
-        mainWindow.maximize();
-  
+        
     }, 1000)
   
 }