Skip to content

Commit

Permalink
set varInspector to null on window close
Browse files Browse the repository at this point in the history
  • Loading branch information
meain committed Oct 15, 2017
1 parent 9edd196 commit 44bce1e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,17 @@ function openVariableInspector () {
protocol: "file:",
slashes: true
}));

varInspector.on('close', () => {
varInspector = null;
})
}

function createWindow () {
win = new BrowserWindow({
x: 20,
y: 0,
width: 750,
x: 20,
y: 0,
width: 750,
height: 1000,
icon: path.join(__dirname, 'livepython.png'),
title: "Livepython"
Expand All @@ -45,7 +49,6 @@ function createWindow () {
if (varInspector) {
varInspector.close();
varInspector = null;

} else {
openVariableInspector();
}
Expand Down

0 comments on commit 44bce1e

Please sign in to comment.