Skip to content

Commit 53812d7

Browse files
author
Christopher Willis-Ford
committed
fix "about" window in packaged context
1 parent 8dcbbfe commit 53812d7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/main/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const isDevelopment = process.env.NODE_ENV !== 'production';
1616
// global window references prevent them from being garbage-collected
1717
const _windows = {};
1818

19-
const createWindow = ({url, ...browserWindowOptions}) => {
19+
const createWindow = ({search = null, url = 'index.html', ...browserWindowOptions}) => {
2020
const window = new BrowserWindow({
2121
useContentSize: true,
2222
show: false,
@@ -48,6 +48,7 @@ const createWindow = ({url, ...browserWindowOptions}) => {
4848
window.loadURL(formatUrl({
4949
pathname: path.join(__dirname, url),
5050
protocol: 'file',
51+
search,
5152
slashes: true
5253
}));
5354
}
@@ -60,8 +61,8 @@ const createAboutWindow = () => {
6061
width: 400,
6162
height: 400,
6263
parent: _windows.main,
63-
title: 'About Scratch Desktop',
64-
url: 'index.html?route=about'
64+
search: 'route=about',
65+
title: 'About Scratch Desktop'
6566
});
6667
return window;
6768
};
@@ -70,8 +71,7 @@ const createMainWindow = () => {
7071
const window = createWindow({
7172
width: defaultSize.width,
7273
height: defaultSize.height,
73-
title: 'Scratch Desktop',
74-
url: 'index.html'
74+
title: 'Scratch Desktop'
7575
});
7676
const webContents = window.webContents;
7777

0 commit comments

Comments
 (0)