Stop progress bar code blowing up if window is defocused before download starts

This commit is contained in:
6ea86b96 2017-07-03 13:54:03 +07:00
parent 37d6e5f918
commit 2cc24318c1

View file

@ -1,6 +1,6 @@
const { remote } = require("electron");
const application = remote.app;
const win = remote.BrowserWindow.getFocusedWindow();
const win = remote.getCurrentWindow();
const setProgressBar = progress => {
win.setProgressBar(progress);