Skip to content

Commit

Permalink
fix state cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
igorls committed Jun 14, 2018
1 parent 76b270a commit ed8795a
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 11,386 deletions.
7 changes: 5 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ const {app, BrowserWindow, Menu} = require('electron');
const path = require('path');
const url = require('url');

let win, serve;
let win, devtools;
const args = process.argv.slice(1);
serve = args.some(val => val === '--serve');
devtools = args.some(val => val === '--devtools');

function createWindow() {
win = new BrowserWindow({
Expand All @@ -25,6 +25,9 @@ function createWindow() {
protocol: 'file:',
slashes: true
}));
if (devtools) {
win.webContents.openDevTools();
}
win.on('closed', () => {
win = null
});
Expand Down
2 changes: 1 addition & 1 deletion ng-dist/main.js

Large diffs are not rendered by default.

Loading

0 comments on commit ed8795a

Please sign in to comment.