Skip to content

Commit

Permalink
Import electron only once
Browse files Browse the repository at this point in the history
  • Loading branch information
janosorcsik authored Jul 26, 2018
1 parent 71db8b4 commit 4e7fac2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import electron from 'electron';
import { app, BrowserWindow, Menu, dialog, shell } from 'electron';
import { app, BrowserWindow, Menu, dialog, powerMonitor, shell } from 'electron';
import moment from 'moment';
import path from 'path';
import setupEvents from './installers/setupEvents';
Expand Down Expand Up @@ -110,7 +109,7 @@ app.on('ready', () => {
createWindow();
menuSetup();

electron.powerMonitor.on('resume', () => {
powerMonitor.on('resume', () => {
mainWindow.reload();
console.log('reloaded');
});
Expand Down

0 comments on commit 4e7fac2

Please sign in to comment.