Skip to content

Commit

Permalink
v1.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
p-sam committed Jan 23, 2021
2 parents 3ffba8f + 8e265d5 commit fcb1f15
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ function electronPrompt(options, parentWindow) {
};

const cleanup = () => {
ipcMain.removeListener('prompt-get-options:' + id, getOptionsListener);
ipcMain.removeListener('prompt-post-data:' + id, postDataListener);
ipcMain.removeListener('prompt-error:' + id, errorListener);

if (promptWindow) {
promptWindow.close();
promptWindow = null;
Expand Down Expand Up @@ -97,9 +101,8 @@ function electronPrompt(options, parentWindow) {
promptWindow.on('unresponsive', unresponsiveListener);

promptWindow.on('closed', () => {
ipcMain.removeListener('prompt-get-options:' + id, getOptionsListener);
ipcMain.removeListener('prompt-post-data:' + id, postDataListener);
ipcMain.removeListener('prompt-error:' + id, postDataListener);
promptWindow = null;
cleanup();
resolve(null);
});

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "electron-prompt",
"version": "1.6.0",
"version": "1.6.1",
"description": "Electron helper to prompt for a value via input or select",
"keywords": [
"electron",
Expand Down

0 comments on commit fcb1f15

Please sign in to comment.