Skip to content

Commit

Permalink
fix: object has been destroyed
Browse files Browse the repository at this point in the history
receive an error from webContents saying the object has been destroyed when executing the line
win.webContents.off('destroyed', disposable);

we can't unsubscribe once it's already destroyed
  • Loading branch information
benoitf committed Aug 28, 2024
1 parent 125230e commit 43f4626
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,6 @@ export default function contextMenu(options = {}) {
const disposeMenu = create(win, options);

const disposable = () => {
win.webContents.off('destroyed', disposable);
disposeMenu();
};

Expand Down

0 comments on commit 43f4626

Please sign in to comment.