Przeglądaj źródła

Debug launch info

Arthur Brandao 5 lat temu
rodzic
commit
ddcec8def5
1 zmienionych plików z 4 dodań i 4 usunięć
  1. 4 4
      main.js

+ 4 - 4
main.js

@@ -14,7 +14,7 @@ if (require('electron-squirrel-startup')) { // eslint-disable-line global-requir
 /* --- Initialisation --- */
 
 // Global var
-let mainWindow;
+global.mainWindow;
 let launchInfo;
 let indexFile = 'src/index.html';
 
@@ -36,14 +36,14 @@ async function main() {
   if (file.exist(path.join(__dirname, '/data/launch-info.json'))) {
     launchInfo = require('./data/launch-info');
     // Reset data if change source between src and app
-    if (launchInfo.app === program.src) {
+    if (launchInfo.folder !== folder) {
       indexFile = 'src/reset.html';
     }
     // Update launch info
-    launchInfo.app = !program.src;
+    launchInfo.folder = folder
   } else {
     launchInfo = {
-      app: !program.src
+      folder: folder
     }
   }
   // Edit launch info file