Skip to content

Commit

Permalink
fix: remove view from map on destroy (wexond#460)
Browse files Browse the repository at this point in the history
  • Loading branch information
sentialx authored May 1, 2020
1 parent a27db24 commit 7e59efb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/view-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,8 @@ export class ViewManager {
public destroy(id: number) {
const view = this.views.get(id);

this.views.delete(id);

if (view && !view.browserView.isDestroyed()) {
this.window.win.removeBrowserView(view.browserView);
view.destroy();
Expand Down

0 comments on commit 7e59efb

Please sign in to comment.