From 05286b01dee18d3da1cccdcf89e8668749b62790 Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Sun, 13 Dec 2020 14:36:12 +0100 Subject: [PATCH] Fix hash in app path issue #40 --- public/electron.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/electron.js b/public/electron.js index 3f5d8967..b0737184 100644 --- a/public/electron.js +++ b/public/electron.js @@ -1,6 +1,5 @@ const electron = require('electron'); // eslint-disable-line const isDev = require('electron-is-dev'); -const { join } = require('path'); const os = require('os'); const unhandled = require('electron-unhandled'); @@ -40,7 +39,9 @@ function createWindow() { }, }); - mainWindow.loadURL(isDev ? 'http://localhost:3001' : `file://${join(__dirname, '../build/index.html')}`); + if (isDev) mainWindow.loadURL('http://localhost:3001'); + // Need to useloadFile for special characters https://github.com/mifi/lossless-cut/issues/40 + else mainWindow.loadFile('build/index.html'); if (isDev) { const { default: installExtension, REACT_DEVELOPER_TOOLS } = require('electron-devtools-installer'); // eslint-disable-line global-require,import/no-extraneous-dependencies