Skip to content

Commit 44bce1e

Browse files
committed
set varInspector to null on window close
1 parent 9edd196 commit 44bce1e

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

main.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,17 @@ function openVariableInspector () {
1919
protocol: "file:",
2020
slashes: true
2121
}));
22+
23+
varInspector.on('close', () => {
24+
varInspector = null;
25+
})
2226
}
2327

2428
function createWindow () {
2529
win = new BrowserWindow({
26-
x: 20,
27-
y: 0,
28-
width: 750,
30+
x: 20,
31+
y: 0,
32+
width: 750,
2933
height: 1000,
3034
icon: path.join(__dirname, 'livepython.png'),
3135
title: "Livepython"
@@ -45,7 +49,6 @@ function createWindow () {
4549
if (varInspector) {
4650
varInspector.close();
4751
varInspector = null;
48-
4952
} else {
5053
openVariableInspector();
5154
}

0 commit comments

Comments
 (0)