Skip to content

Commit

Permalink
Cheeky workaround for setupProtocols on win32
Browse files Browse the repository at this point in the history
  • Loading branch information
ikigeg authored and rkclark committed May 13, 2019
1 parent 918c7f2 commit 0df1929
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion public/electron-starter.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ const isDev = require('electron-is-dev');
const path = require('path');
const url = require('url');
const electron = require('electron');
const os = require('os');

const menuTemplate = require('./electronHelpers/menuTemplate');
const runAutoUpdater = require('./electronHelpers/autoUpdater');
const setupProtocols = require('./electronHelpers/setupProtocols');

const { app, shell, Menu } = electron;
const currentPlatform = os.platform();

require('electron-debug')({
enabled: true,
Expand Down Expand Up @@ -90,7 +92,9 @@ app.on('ready', () => {
const menu = Menu.buildFromTemplate(menuTemplate);
Menu.setApplicationMenu(menu);

setupProtocols(electron);
if (currentPlatform !== 'win32') {
setupProtocols(electron);
}
createMainWindow();
runAutoUpdater(mainWindow);
});
Expand Down

0 comments on commit 0df1929

Please sign in to comment.