From 4e7fac250a6c6b0cbbc3542356aafc1c20755db9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1nos=20Orcsik?= Date: Thu, 26 Jul 2018 15:56:28 +0200 Subject: [PATCH] Import electron only once --- main.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index e40da36..f6435c5 100644 --- a/main.js +++ b/main.js @@ -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'; @@ -110,7 +109,7 @@ app.on('ready', () => { createWindow(); menuSetup(); - electron.powerMonitor.on('resume', () => { + powerMonitor.on('resume', () => { mainWindow.reload(); console.log('reloaded'); });