Skip to content

Commit

Permalink
Merge pull request #64 from janosorcsik/patch-1
Browse files Browse the repository at this point in the history
Import electron only once
  • Loading branch information
cassidoo authored Jan 21, 2020
2 parents 71db8b4 + 4e7fac2 commit 159873d
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 159873d

Please sign in to comment.