Skip to content

Commit

Permalink
Merge pull request #552 from nos/develop
Browse files Browse the repository at this point in the history
[Release] Version 0.3.0 (redo)
  • Loading branch information
mhuggins authored Sep 17, 2018
2 parents 86c113b + eedc731 commit e40a0fd
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
6 changes: 6 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,12 @@ workflows:
ignore: /.*/
tags:
only: /[0-9]+(\.[0-9]+)+.*/
- deploy_win32:
filters:
branches:
ignore: /.*/
tags:
only: /[0-9]+(\.[0-9]+)+.*/
- deploy_linux:
filters:
branches:
Expand Down
1 change: 1 addition & 0 deletions src/main/util/bindMenus.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const NULL_WEBVIEW = {
isDevToolsOpened: () => false,
goBack: noop,
goForward: noop,
reload: noop,
on: noop,
addListener: noop,
removeListener: noop
Expand Down
19 changes: 10 additions & 9 deletions static/preloadRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,17 @@ function createDelegate(channel) {
const successChannel = `${channel}-success-${id}`;
const failureChannel = `${channel}-failure-${id}`;

try {
ipcRenderer.once(successChannel, (event, ...successArgs) => resolve(...successArgs));
ipcRenderer.once(failureChannel, (event, message) => reject(new Error(message)));
ipcRenderer.sendToHost(channel, id, ...args);
} catch (err) {
reject(err);
} finally {
ipcRenderer.removeAllListeners(successChannel);
ipcRenderer.once(successChannel, (event, ...successArgs) => {
ipcRenderer.removeAllListeners(failureChannel);
}
resolve(...successArgs);
});

ipcRenderer.once(failureChannel, (event, message) => {
ipcRenderer.removeAllListeners(successChannel);
reject(new Error(message));
});

ipcRenderer.sendToHost(channel, id, ...args);
});
}

Expand Down

0 comments on commit e40a0fd

Please sign in to comment.