Stop using __dirname to avoid confusing

This commit is contained in:
Yuya Ochiai
2017-03-06 23:31:06 +09:00
parent 3b4a1dfca9
commit 1ab0859ac1
7 changed files with 9 additions and 9 deletions

View File

@@ -18,7 +18,7 @@ const appLauncher = new AutoLaunch({
function backToIndex(index) {
const target = typeof index === 'undefined' ? 0 : index;
const indexURL = remote.getGlobal('isDev') ? 'http://localhost:8080/browser/index.html' : `file://${__dirname}/index.html`;
const indexURL = remote.getGlobal('isDev') ? 'http://localhost:8080/browser/index.html' : `file://${remote.app.getAppPath()}/browser/index.html`;
remote.getCurrentWindow().loadURL(`${indexURL}?index=${target}`);
}